Stop-LXCATask

This cmdlet cancels one or more running or pending tasks (jobs) on the Lenovo XClarity Administrator server.

Not all tasks can be stopped. This cmdlet stop only tasks for which the isStoppable attribute is set to true. The task ID is returned for only the tasks that were stopped.

Note: You cannot pipe objects to this cmdlet.

Syntax

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

Stop-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 cancels all running and pending tasks from the XClarity Administrator server.

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

$tasks = Get-LXCATask -State Running,Pending
$(Stop-LXCATask -Tasks $tasks)

Disconnect-LXCA

Related links