Author Posts

July 13, 2017 at 2:22 pm

Hi Everyone

Wondering if there is a way to log if a user quits a powershell script while it is running?

So if the user just Xs out of the script it would log the move before it officially quits. I would also like to log if the computer goes to reboot while the script is running and the computer quits the script.

Is this possible?

July 13, 2017 at 2:23 pm

Not really. They're killing the process; the process' contents – your script – aren't notified of that. You'd probably have to develop a custom host.