Syntax
Stop-Task [-Task] <Task[]> [-Confirm] [-WhatIf] [<CommonParameters>]Related Commands
Online VersionDetailed Description
This cmdlet stops the tasks specified by the Task parameter.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Task | Task[] | Specifies the tasks you want to stop. | true | True (ByValue) | |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | False | |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | False |
Return Type
NoneNotes
Examples
-------------------------- Example 1 --------------------------
$vm = Get-VM -Name "VM1" $datacenter = Get-Datacenter -Name "Datacenter1" $task = New-Template -Name "Template1" -Location $datacenter -VM $vm -RunAsync Stop-Task -Task $task
Stops the process of creating a new template from a virtual machine.