Friday, 25 January 2013

Random Sleep with Powershell

I like nothing better than a random sleep.

With powershell this is very easy and configurable. We can grab a random number within a defined range, and then sleep for that duration in seconds.

$Timer = Get-Random -Maximum 10 -Minimum 1
Start-Sleep $Timer

No comments:

Post a Comment