0

I would like to have a function that pauses for say 60 seconds to wait for user input, if there is no user input, then continue to run, or if there is user input, read the input and continue to run. This is for a continuously running environment with minimal manual intervention. However, sometimes it is desirable to be able to handle human intervention (for example if some problem within the system happened) so that the script can be paused, and after the problem has been solved, can resume.

Timeout seems to suit this purpose, in CMD, but does anybody know of a similar function in Powershell? Thank you!

FrozenLand
  • 259
  • 1
  • 4
  • 14
  • You really should Google these things before asking: [Waiting for user input with a timeout](http://stackoverflow.com/questions/150161/waiting-for-user-input-with-a-timeout) – tnw Oct 07 '13 at 18:02
  • And yet another: http://blogs.technet.com/b/heyscriptingguy/archive/2010/08/12/august-12-2010.aspx – tnw Oct 07 '13 at 18:03
  • @tnw Sorry I did not find these sites. Thank you! – FrozenLand Oct 07 '13 at 18:13
  • i found a similar thread. [See Link][1] [1]: http://stackoverflow.com/questions/150161/waiting-for-user-input-with-a-timeout – Patrick Oct 07 '13 at 19:11

0 Answers0