[servername] Connecting to remote server @R_301_159@ 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.
错误似乎是随机的.该脚本将工作,然后失败.创建会话的命令处于循环中(创建会话,删除会话),并作为一组部署脚本的一部分被多次调用.当脚本失败时,它会在不同的点失败.
我检查了本地工作站(win7)目标服务器(win2008R2)上的事件日志,但没有我能看到的错误.
这是随机失败的行:
$session = New-PSSession -ComputerName $serverName -Credential $credential
我在Win2003上没有看到这个问题.脚本没有改变.我假设问题出在目标服务器上,但找不到任何错误或日志要查看.它将工作一次然后失败,因此我的部署脚本有时会成功,然后在不同的点失败.
任何有关追踪此问题的指导都将非常感激.