Print
Hits: 2753

There may be times when you need to PS Remote to a server from a computer that is not in the domain.  I have a new laptop that I have decided to keep off my domain.  Here are the steps required to allow my Win8 PC to PSRemote to a 2012 R2 server.


1. On the Win8 computer run the following commands:

cd WSMan:\localhost\Client

Set-Item .\TrustedHosts -Value "*" -Force

2. On the 2012 R2 Server run the same commands:

cd WSMan:\localhost\Client

Set-Item .\TrustedHosts -Value "*" -Force

You may consider setting a value for TrustedHosts on the server.  This will provide higher level of security.  Value should be IP Address.


3. Verify WinRM service is running by running the following command from elevated PS session:

Test-WSMan -computername "targetPCname"

That should do it.  You should be able to connect from the Win8 PC by entering the following in PS session:

$creds = get-credential

Enter-PSSession -ComputerName HOU-DC01 -Credential $creds

Two things to consider.  You must use a variable for credentials.  Using the -credential parameter and passing it a value inline does not work.  Not sure if this is a bug.  Also, to use the -UseSSL parameter you must configure a port.  I have not shown you how to do that here.