Powershell - Start-Sleep Cmdlet



Cmdlet

Start-Sleep cmdlet suspends the activity in a script or session for the particular period of time.

In these examples, we're see the Start-Sleep cmdlet in action.

Example 1

In this example, we'll suspend the current process for 15 seconds.

Start-Sleep -s 15

Output

You can see PowerShell console resumes after 15 seconds.

Example 2

In this example, we'll suspend the current process for 500 milliseconds.

Start-Sleep -m 500
powershell_advanced_cmdlets.htm
Advertisements