Powershell Loop Freezing, waiting for enter when there is no input needed
I have a powershell script that is looping while connecting to server, and checking to see if some jobs are done. It checks开发者_如何学编程, sleeps for 60 seconds and then checks again. The script will keep checking until no jobs are found.
However, every now and then, the script just hangs for no reason. If I hit enter, it starts up again. There is no input in this entire script. At no point do I grab anything from the host. Why is it doing this and how can I prevent it? It's no good for automation if I have to randomly hit enter for no reason.
BTW, I am using Powershell 2.0.
Thanks in advance
Is it running in a Console window? If so have you managed to start a select (with the mouse): the title should have changed to start "Select".
When selecting the console window is frozen... and if only one character cell is selected it can be hard to spot...
精彩评论