我们的服务器已设置为启用 Powershell Remoting,以便我们可以从我们的开发人员机器远程执行脚本。我应该补充一点,我对 Powershell 不是很流利,也没有参与设置。
但是最近我们的服务器出现故障,随后不得不恢复。恢复过程应该将 Windows 恢复到上次备份状态,包括所有程序和数据。但是,自恢复以来,Powershell Remoting 不再在服务器上运行。
我现在在运行时收到以下错误Enter-PSSession ServerName
。
Enter-PSSession : Connecting to remote server failed with the following error message : <f:WSManFault xmlns:f="http://s
chemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2147749890" Machine="ServerName"><f:Message></f:Message></f:WSManFaul
t> For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:16
+ enter-pssession <<<< ServerName
+ CategoryInfo : InvalidArgument: (ServerName:String) [Enter-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed
或者运行时出现以下错误New-PSSession ServerName
[ServerName] Connecting to remote server failed with the following error message : <f:WSManFault xmlns:f="http://schemas.
microsoft.com/wbem/wsman/1/wsmanfault" Code="2147749890" Machine="ServerName"><f:Message></f:Message></f:WSManFault> For
more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
eption
+ FullyQualifiedErrorId : PSSessionOpenFailed
(出于隐私目的,我已将上面的实际服务器名称替换为 ServerName)
任何帮助深表感谢