I have a number of remote jobs started with a Powerhsell invoke-command -session
command. In some cases, at least one of the remote child job exits, but the local PS session state reports the jobs as "Running"
and the session hangs waiting for the job to finish.
Is this a known bug in PSv2? Is there a workaround or technique to allow PS to correctly detect when a remote child job exits?
How about: Remove-PSSession
Get-PSSession | Remove-PSSession
Remove-PSSession -Session (Get-PSSession)
$s = Get-PSSession
Remove-PSSession -Session $s
OR
$r = Get-PSSession -ComputerName Serv*
$r | Remove-PSSession
Powershell Core: Remove-PSSession
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With