Windows PowerShell command on Get-command Start-Sleep
MyWebUniversity

Windows PowerShell command on Get-command Start-Sleep

NAME

Start-Sleep

SYNOPSIS

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

SYNTAX

Start-Sleep -Milliseconds []

Start-Sleep [-Seconds] []

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

Specifies how long the resource sleeps in milliseconds. The parameter can be abbreviated as m . Required? true Position? named Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false

-Seconds

Specifies how long the resource sleeps in seconds. You can omit the parameter name ( Seconds ), or you can abbreviate it as s . Required? true Position? 0 Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

System.Int32

You can pipe the number of seconds to Start-Sleep .

OUTPUTS

None This cmdlet does not return any output.

NOTES

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

*

Example 1: Sleep all commands for 15 seconds

PS C:\>Start-Sleep -s 15

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

Example 2: Sleep all commands

PS C:\>Start-Sleep -m 500

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

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=821864



Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 OurUNIX.com ™