Remove-LXCATask

This cmdlet deletes one or more tasks (jobs) from the Lenovo XClarity Administrator server. Each task must be in a stopped, cancelled, or complete state before it can be removed.

Not all tasks can be deleted. This cmdlet deletes only tasks for which the isDeletable attribute is set to true. Task IDs are returned for only the tasks that were deleted.

Note: You cannot pipe objects to this cmdlet.

Syntax

Remove-LXCATask [-Connection LXCAConnection] 
                 -TaskUIDs String[]
                [CommonParameter]

Remove-LXCATask [-Connection LXCAConnection] 
                 -Tasks LxcaJob[]
                [CommonParameter]

Parameters

-Connection LXCAConnection
Specifies the connection to the Lenovo XClarity Administrator server. If no connection is specified, the result from the last Connect-LXCA cmdlet is used.
-TaskUIDs String[]
Specifies one or more task IDs.
Note: The following aliases are accepted for this parameter name for backward compatibility. These aliases will be deprecated in a future release.
  • -JobID

  • -TaskId

  • -TaskUID

-Tasks LxcaJob[]
Specifies one or more task instances.
Note: The following aliases are accepted for this parameter name for backward compatibility. These aliases will be deprecated in a future release.
  • -Job

  • -Task

CommonParameters
This cmdlet supports the following common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable, -OutBuffer, -PipelineVariable, -OutVariable. For detailed information about each common parameter, see the Microsoft PowerShell Common Parameters webpage.

Results

Examples

The following example deletes all tasks that are in Cancelled or Complete State on the XClarity Administrator server.

$cred = Get-Credential
Connect-LXCA -Host 192.0.2.0 -Credential $cred

$tasks = Get-LXCATask -State Cancelled,Complete
$(Remove-LXCATask -Task $tasks)

Disconnect-LXCA

Related links