For system, network and cloud administrators

How to add a “wait” time to your PowerShell script

How to add a "wait" time to your PowerShell script

I’m using the Windows PowerShell whenever I plan on automating ordinary tasks like scheduling my computer to turn off at a specific time. And I prefer using PowerShell scripts rather than installing 3rd party software to do those ordinary tasks for me. But no matter the purpose of your PowerShell use, I believe you’ll find this small article useful.

Start-Sleep -s NumberOfSeconds

The above command will make your PowerShell script “wait” before executing the next command in your script. That’s it :).

Leave a Reply

Your email address will not be published. Required fields are marked *