微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

test-wsman 有效,但 enter-pssession 失败

如何解决test-wsman 有效,但 enter-pssession 失败

我正在尝试从 server1(它们都在同一个域中)在 server2 上打开远程 powershell 会话。当我尝试从 server1 运行以下命令时:

Enter-pssession -computername server2 -Credential $cred

我收到以下错误

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

但是运行 test-wsman 命令会给出:

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

无法弄清楚问题。已尝试启用-PSRemoting 并检查代理的 $PSSessionoption。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。