Commands / System

Start-Sleep

Pause for N seconds

beginner System Aliases sleep

Start-Sleep
 Start-Sleep -Seconds 5
Works on
WindowsLinuxmacOS
PowerShell
5.1 and later
Reference
Microsoft Learn: Start-Sleep

Blocks the session. -Seconds or -Milliseconds. Use it in loops so you do not hammer a host.

Try this

'before'; Start-Sleep -Seconds 2; 'after'

Coming from another shell

ShellWhat you might type
bash / zshsleep 5
cmd.exetimeout /t 5

More in From bash and From cmd.

Related commands