I'm running a basic Powershell script on a remote server, and while it's running, it ignores keyboard input completely. This is intended. When, however, you click anywhere in the Powershell window, it stops input until you clear the pause with a keypress.
Is there some way I can force Powershell to ignore mouse input altogether while the script is running? I want this to be as difficult to close as possible, ie. you need to actually click X to close the window, or kill the process, or the like.
Running in a Command Prompt window instead is acceptable, but I'd rather run it in the Powershell GUI instead if possible.