A Broken PS-Session Issue

Symptoms:

PS C:\Windows\system32> get-pssession
 Id Name            ComputerName    ComputerType    State         ConfigurationName     Availability
 -- ----            ------------    ------------    -----         -----------------     ------------
  5 Session5        sherver008        RemoteMachine   Broken        Microsoft.PowerShell          None

PS C:\Windows\system32> enter-pssession sherver008
enter-pssession : Connecting to remote server sherver008 failed with the following error message : The client cannot
connect to the destination specified in the request. Verify that the service on the destination is running and is
accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most
commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to
analyze and configure the WinRM service: "winrm quickconfig". For more information, see the
about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ enter-pssession $hyperVHost
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (sherver008:String) [Enter-PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : CreateRemoteRunspaceFailed
Resolution:

PS C:\Windows\system32> Disable-WSManCredSSP -Role Client
PS C:\Windows\system32> get-pssession|remove-pssession

Leave a Reply

Your email address will not be published. Required fields are marked *