0
I setup the remote PowerShell access on the remote computer with the commands below:
Enable-PSRemoting -Force
Set-Item wsman:\localhost\Client\TrustedHosts -value '*' -Force
Get-Item wsman:\localhost\Client\TrustedHosts
WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Client
Type Name SourceOfValue Value
---- ---- ------------- -----
System.String TrustedHosts GPO *
They seemed to work just fine.
However, when trying to open a PowerShell session, I'm getting the error below:
New-PSSession -ComputerName 10.155.40.10
New-PSSession : [10.155.40.10] Connecting to remote server 10.155.40.10 failed with the following error message : The WinRM client cannot process the request. If the authentication scheme is different from Kerberos, or if the client computer is not joined to a domain, then HTTPS transport must be used or the destination machine must be added to the TrustedHosts configuration setting. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. You can get more information about that by running the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ New-PSSession -ComputerName 10.155.40.10
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Management.A\u2026tion.RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : ServerNotTrusted,PSSessionOpenFailed
However, both pinging and accessing to the remote computer with RDP works:
Test-Connection 10.155.40.10
Pinging 10.155.40.10 [10.155.40.10] with 32 bytes of data:
Reply from 10.155.40.10: bytes=32 time=4ms TTL=125
Reply from 10.155.40.10: bytes=32 time=4ms TTL=125
Reply from 10.155.40.10: bytes=32 time=4ms TTL=125
Reply from 10.155.40.10: bytes=32 time=4ms TTL=125
Ping complete.
Source Destination Replies
------ ----------- -------
XXXXXXX 10.155.40.10 {System.Net.NetworkInformation.PingReply, System.Net.NetworkInformation.PingReply, System.Net.NetworkInformation.PingReply, System.Net.NetworkInformation.PingReply}
Any idea why I can't still open a PowerShell session?