Skip to main content

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.
-Tasks LxcaJob[]
Specifies one or more task instances.
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

  • System.String[]

    This cmdlet removes one or more tasks from the XClarity Administrator server and returns the task UIDs of the deleted jobs as an array of strings.

    If none of the specified tasks can be deleted, the returned object is an empty array.

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