Posted On June 30, 2020

A Broken PS-Session Issue

kimconnect 0 comments
blog.KimConnect.com >> Codes >> 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 *

Related Post

PowerShell: Automating Dynamics CRM Migration

This is the source code that has been used to move hundreds of Dynamics CRM…

PowerShell: Invoke Backup SQL Database

Function to invoke SQL Backups on a Remote SQL Server: # invokeSqlBackup.ps1 # Version 0.0.1…

Puppet Client Server Lab Setup

Server # Setup client machine name sudo vim /etc/hosts ## Insert this line ## xx.xx.xx.xx…