gpt4 book ai didi

powershell - 服务器还原后Powershell远程处理失败

转载 作者:行者123 更新时间:2023-12-02 23:47:02 25 4
gpt4 key购买 nike

我们的服务器已设置为启用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替换了上面的实际服务器名称)

任何帮助深表感谢

最佳答案

根据this Microsoft Connect item,尝试将-SessionOption (New-PSSessionOption -NoMachineProfile)添加到Enter-PSSession命令中。

我不知道为什么需要这样做,但是值得一试。

关于powershell - 服务器还原后Powershell远程处理失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18060882/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com