Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
Set-Variable -Name "HV_Server" -Value "server.domain.com"
Set-Variable -Name "HV_Server_Admin_Username" -Value "Administrator"

Client:

No Format
Set-Item WSMan:\localhost\Client\TrustedHosts -Value $HV_Server
Enable-WSManCredSSP -Role client -DelegateComputer $HV_Server
Enable-WindowsOptionalFeature -Online -FeatureName:Microsoft-Hyper-V -All
cmdkey /add:$HV_Server /user:$HV_Server_Admin_Username /pass

Test:

No Format
Invoke-Command { Write-Host "hello, world" } -computername $HV_Server -credential $HV_Server_Admin_Username

Sources:

https://serverfault.com/questions/277573/cannot-get-credssp-authentication-to-work-in-powershell