Syntax
Stop-Task [-Task] <Task[]> [-WhatIf] [-Confirm] [<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.