Stop-Task

This cmdlet stops the tasks specified by the Task parameter.

Syntax

-Task  <Task[]>
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Task
Task[] named
  • pipeline
  • Specifies the tasks you want to stop.

    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

    Feedback

    Was this page helpful?