Get full stack trace from remote session Get full stack trace from remote session powershell powershell

Get full stack trace from remote session


If you're doing a remote session, don't use write-host. Try this:

catch {     Write-Error ($_ | fl * -force | out-string)}

The other option is not to catch the exception and the let error propagate back to the local session. But I suspect you want to attempt to recover?