I have a powershell script that loops around when connecting to the server and checks if some tasks are complete. He checks, sleeps for 60 seconds, and then checks again. the script will continue to check until no jobs are found.
However, from time to time, the script simply freezes for no reason. If I press "Enter", it will start again. There is no input to this entire script. In no case do I take anything from the host. Why is this done and how can I prevent it? This is not useful for automation if I have to accidentally press Enter for no reason.
By the way, I'm using Powershell 2.0.
Thanks in advance
source
share