Remove-EnvTestTask

Last published : Oct 31, 2026
Removes from the database completed tasks for the EnvTest Service.

Syntax

Remove-EnvTestTask
      [<CitrixCommonParameters>]
      [<CommonParameters>]
Remove-EnvTestTask
      [-Task <EnvTestTask>]
      [<CitrixCommonParameters>]
      [<CommonParameters>]
Remove-EnvTestTask
      [-TaskId <Guid>]
      [<CitrixCommonParameters>]
      [<CommonParameters>]

Description

Enables completed tasks that have run within the EnvTest Service to be removed from the database.

Examples

EXAMPLE 1

Removes the current task from the EnvTest service.
Remove-EnvTestTask

EXAMPLE 2

Removes a task from the EnvTest service via its id, which is available from an existing task's \$task.TaskId property.
Remove-EnvTestTask -TaskId 50A4139F-2B55-4A97-A1BE-20EE4E124AA3

EXAMPLE 3

Removes the second task in the list returned by Get-EnvTestTask -List.
$secondTask = $(Get-EnvTestTask -List)[1]
Remove-EnvTestTask -Task $secondTask

Parameters

-TaskId

Specifies the identifier of the task to be removed, retrieveable from the \$task.TaskId property.
Type: Guid
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-Task

Specifies the task to be removed.
Type: EnvTestTask
Position: Named
Default value: None
Required: False
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

CitrixCommonParameters

This cmdlet supports the common Citrix parameters: -AdminAddress, -AdminClientIP, -BearerToken, -TraceParent, -TraceState and -VirtualSiteId. For more information, see about_CitrixCommonParameters.

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

You can't pipe objects to this cmdlet.

Outputs

None

By default, this cmdlet returns no output.