Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Start-Sleep

Start-Sleep

microsoft.powershell.commands.utility.dll

Synopsis

Suspends the activity in a script or session for the specified period of time.

Syntax

Start-Sleep [-Seconds] [<CommonParameters>]

Start-Sleep [-Milliseconds] [<CommonParameters>]

Detailed Description

The Start-Sleep cmdlet suspends the activity in a script or session for the specified period of time. You can use it for many tasks, such as waiting for an operation to complete or pausing before repeating an operation.

Parameters

-Milliseconds <Int32>

Specifies how long the resource sleeps in milliseconds. The parameter can be abbreviated as "-m".

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Seconds <Int32>

Specifies how long the resource sleeps in seconds. You can omit the parameter name ("Seconds"), or you can abbreviate it as "-s".

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

true (ByValue, ByPropertyName)

Accept wildcard characters?

false

Input Type

System.Int32

Return Type

None

Notes

You can also refer to Start-Sleep by its built-in alias, "sleep". For more information, see about_Aliases.

Examples

-------------------------- EXAMPLE 1 --------------------------

This command makes all commands in the session sleep for 15 seconds.

PS C:\>Start-Sleep -s 15

-------------------------- EXAMPLE 2 --------------------------

This command makes all the commands in the session sleep for one-half of a second (500 milliseconds).

PS C:\>Start-Sleep -m 500

Online Version