Stop-Task
This cmdlet stops the tasks specified by the Task parameter.
Syntax
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required
|
Task | Task[] | named |
|
Specifies the tasks you want to stop. |
optional | ProgressAction | ActionPreference | named |
|
Output
Examples
Example 1
Import-Module VMware.VimAutomation.Core $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. This example uses commands from the VMware.VimAutomation.Core module.
Related Commands
Task
This cmdlet retrieves the tasks on the specified VMware Server.
This cmdlet stops the specified tasks.
This cmdlet waits for the completion of the specified tasks.