How to repair a broken powershell remote session

Hi every,

normally, I will create multiple ps sessions and assign it to a variable with below way:

$mypss = New-PSSession -ComputerName (cat mycomputers.txt)

But sometimes, one of session is broken, how to repair it rather than create a new ps session.

 Id Name            Transport ComputerName    ComputerType    State         ConfigurationName     Availability
 -- ----            --------- ------------    ------------    -----         -----------------     ------------
 77 Runspace77      WSMan     xxxx   RemoteMachine   Broken        Microsoft.PowerShell          None

Thanks in advance.

Don’t! Remove it! Create it new! :man_shrugging:t4:

I need to reuse it, so I need a way to fix it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.