I am trying to open a remote powershell session on server2 from server1(both of them in the same domain). When I try to run the following command from server1:
Enter-pssession -computername server2 -Credential $cred
I get the following error:
Enter-pssession : Connecting to remote server server2 failed with the following error message : The WSMan service
could not launch a host process to process the given request. Make sure the WSMan provider host server and proxy are
properly registered. For more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : InvalidArgument: (server2:String) [Enter-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed
But running the test-wsman command gives:
Test-WSMan -ComputerName server2 -Credential $cred -Authentication Kerberos
wsmid : http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd
ProtocolVersion : http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd
ProductVendor : Microsoft Corporation
ProductVersion : OS: 10.0.17763 SP: 0.0 Stack: 3.0
Can't figure out the issue. Have tried Enable-PSRemoting and checked $PSSessionOption for proxy.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…