Suspend shell, script, or runspace activity for a specified period of time.
Syntax
Start-Sleep [-seconds] int [CommonParameters]
Start-Sleep -milliseconds int [CommonParameters]
Key
-seconds int
How long to sleep, can be abbreviated to -s
{can be piped}
-milliseconds int
How long to sleep in Milliseconds, can be abbreviated as -m
CommonParameters:
-Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable,
-OutBuffer -OutVariable.
Example
Sleep for 60 seconds:
PS C:\> Start-Sleep -s 60
“Many things--such as loving, going to sleep, or behaving unaffectedly--are done worst when we try hardest to do them” - C.S. Lewis
Related:
Equivalent bash command: sleep - Delay for a specified time