Product Documentation

Switch-EnvTestTask

Oct 12, 2015

Sets the current task that will be returned by a call to Get-EnvTestTask with no parameters.

Syntax

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

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

Detailed Description

Sets the current task that will be returned by a call to Get-EnvTestTask with no parameters.

Parameters

-TaskId<Guid>

Specifies the identifier of the task to be made current.

Required? false
Default Value  
Accept Pipeline Input? false

-Task<EnvTestTask>

The task object to be made current, retrieveable from the $task.TaskId property.

Required? false
Default Value  
Accept Pipeline Input? false

-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

Input Type

System.Management.Automation.PSObject Objects containing the TaskId parameter can be piped to the Remove-EnvTestTask command.

Examples

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

Switch-EnvTestTask -TaskId 50A4139F-2B55-4A97-A1BE-20EE4E124AA3

Switches the current task to another via its id, which is available from an existing task's $task.TaskId property.

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

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

Switches the current task to the second in the list returned by Get-EnvTestTask -List.