Powershell 3.0 Enter-PSSession 随机失败,重新启动即可解决。目标计算机上的事件查看器中出现 DCOM 错误

Powershell 3.0 Enter-PSSession 随机失败,重新启动即可解决。目标计算机上的事件查看器中出现 DCOM 错误

使用 PowerShell 的 Enter-PSSession(即使是在本地,针对本地计算机)会随机失败并显示以下消息。运行 Windows 2012 Standard 并进行所有更新。错误消息需要一段时间才能显示。

命令:

Enter-PSSession -ComputerName MYHOSTNAME

信息:

Enter-PSSession : Connecting to remote server MYHOSTNAME 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.
At line:1 char:1
+ Enter-PSSession -ComputerName MYHOSTNAME
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (MYHOSTNAME:String) [Enter-PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : CreateRemoteRunspaceFailed

重新启动服务器可以使其再次工作,直到不到 24 小时后,它又开始出现故障。

在消息返回的同一秒,事件查看器中记录以下内容:

Source: DistributedCOM
EventID: 10010
Message: The server {9ACF41ED-D457-4CC1-941B-AB02C26E4686} did not register with DCOM within the required timeout.

相关内容