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

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

命令:

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小时,然后再次启动失败。

在完全相同的第二个消息被返回,在事件查看器中logging以下内容:

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