Question

Our server had been set up to have Powershell Remoting enabled, so that we can remotely execute scripts from our developer machines. I should add that I am not massively fluent in Powershell and was not involved in setting this up.

However recently our server suffered a fault and subsequently had to be restored. The restoration process was supposed to restore Windows back to its last backed up state including all programs and data. However since the restore, Powershell Remoting no longer works on the server.

I receive the following error now when running 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

Or I get the following error when running 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

(I have replaced the actual server name above with ServerName for privacy purposes)

Any help is much appreciated

Was it helpful?

Solution

Based on this Microsoft Connect item, try adding-SessionOption (New-PSSessionOption -NoMachineProfile) to your Enter-PSSession command.

I have no idea why this would be needed, but it's worth a shot.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top