Add AD security group to local administrators on Hyper-V server running core
First connect to the remote server with powershell
1 |
[cc lang="powershell"]Enter-PSSession -ComputerName contoso\hv01[/cc] |
Next run the command to add the group:
1 |
[cc lang="powershell"]Add-LocalGroupMember -Group "Administrators" -Member "CONTOSO\Hyper-V Admins"[/cc] |
If you’re paranoid (like me) and want to check this worked you can use:
1 |
[cc lang="powershell"]Get-LocalGroupMember "Administrators"[/cc] |