Product Documentation

Stop-EnvTestTask

Nov 17, 2015

Stops a still running task from completing.

Syntax

Stop-EnvTestTask [-TaskId <Guid>] [-AdminAddress <String>] [<CommonParameters>]

Stop-EnvTestTask [-Task <EnvTestTask>] [-AdminAddress <String>] [<CommonParameters>]

Detailed Description

Stops a still running task from completing. A task may still be retreived via Get-EnvTestTask until it Remove-EnvTestTask is called with its task id.

Parameters

-TaskId<Guid>

The id of the task to stop, retrieveable from the $task.TaskId property.

Required? false
Default Value  
Accept Pipeline Input? false

-Task<EnvTestTask>

An EnvTestTask representing the task to stop

Required? false
Default Value  
Accept Pipeline Input? true (ByValue)

-AdminAddress<String>

Specifies the address of a XenDesktop controller the PowerShell snap-in will connect to. You can provide this as a host name or an IP address.

Required? false
Default Value Localhost. Once a value is provided by any cmdlet, this value becomes the default.
Accept Pipeline Input? false

Examples

-------------------------- EXAMPLE 1 --------------------------

Stop-EnvTestTask

Stops the current task from completing if it is still running.

-------------------------- EXAMPLE 2 --------------------------

Stop-EnvTestTask -TestId 50A4139F-2B55-4A97-A1BE-20EE4E124AA3

Stops a task from completing via its id, which is available from an existing task's $task.TaskId property.

-------------------------- EXAMPLE 3 --------------------------

$secondTask = $(Get-EnvTestTask -List)[1] 
Stop-EnvTestTask -Task $secondTask

Stops the second task in the list returned by Get-EnvTestTask -List.