Wednesday, October 28, 2015

Using the Sleep command in PowerShell

If you need to introduce a Pause or a Wait in a PowerShell script, you can use the Start-Sleep Cmdlet as outlined here: https://technet.microsoft.com/en-us/library/ee177002.aspx

This Cmdlet was introduced with PowerShell v. 3.0, so you cannot use it with versions of PowerShell older than v. 3.0.

Hopefully you are using PowerShell v. 4.0 or later, so that you can leverage this very useful functionality as part of your PowerShell scripts!

No comments:

Post a Comment