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.

Note: You cannot pipe objects to this cmdlet.

Syntax

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

Remove-LXCATask [-Connection LXCAConnection] 
                 -Task TaskData[]
                [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.
-TaskID String[]
Specifies one or more task IDs.
-Task TaskData[]
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

This cmdlet removes one or more tasks from the Lenovo XClarity Administrator server. No object is returned.

Examples

The following example deletes all tasks that are not currently running from the XClarity Administrator server.

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

$tasks = Get-LXCATask -State Complete,Cancelled,"Cancelled With Errors","Stopped With Error"
Foreach($task in $tasks)
{
    Remove-LXCATask -Task $task
}

Disconnect-LXCA

Related links