powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Wait-Task



NAME
Wait-Task

SYNOPSIS
Waits for the completion of the specified tasks.

SYNTAX
Wait-Task [-Task] []


DESCRIPTION
Waits for the specified tasks to complete or fail before allowing the next command input. The task progress is obse
rved in real time on the console screen.


PARAMETERS
-Task
Specify the tasks you want to wait to complete.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
None


NOTES




-------------- Example 1 --------------

C:\PS>$task = Remove-VM -VM VM -Confirm -RunAsync

Wait-Task -Task $task


Waits for the virtual machine to be removed before allowing the next command input.






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Wait-Task.html
Get-Task
Stop-Task