私たちのサーバーは、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 に置き換えました)
どんな助けでも大歓迎です