Quantcast
Viewing latest article 2
Browse Latest Browse All 3

PSRemoting into non-domain joined computers: It’s not you, it’s me.

I get this question a lot: “How do I remote into a non-domain joined computer using PowerShell? The server is throwing all kinds of authentication errors on me!”

Au contraire, as they say. It’ s actually not the server being funky, it’s your client. By default, your WinRM client is set to only allow you to remote “out” using Kerberos to any host. It’s easily fixed, though:

#You need to run as admin to tweak the WSMAN client settings. The WSMan service also needs to be running
#(on your client, that is)
cd WSMan:\localhost\Client
Set-Item .\TrustedHosts -Value "*" -Force

$cred = Get-Credential
Enter-PSSession -ComputerName "10.0.0.8" -Credential $cred
#I have the session power!
Exit-pssession

You’re basically telling your local WinRm client to stop being such a bore and allow communication to any host even if Kerberos isn’t available. Your shiny freshly installed Windows 2012 Server was sitting there just waiting for you all along!


Viewing latest article 2
Browse Latest Browse All 3

Trending Articles