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.
- -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 stops one or more tasks from the XClarity Administrator server and returns the task UIDs of the stopped jobs as an array of strings.
If none of the specified tasks can be stopped, the returned object is an empty array.
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
Give documentation feedback