Get-LXCATask

This cmdlet retrieves information about one or more tasks (jobs) from the Lenovo XClarity Administrator server.

Note: You cannot pipe objects to this cmdlet.

Syntax

Get-LXCATask [-Connection LXCAConnection] 
             [-LegacyMode SwitchParameter]
             [CommonParameter]

Get-LXCATask [-Connection LXCAConnection] 
             [-LegacyMode SwitchParameter]
              -TaskUIDs String[]
             [CommonParameter]

Get-LXCATask [-Connection LXCAConnection]
             [-LegacyMode SwitchParameter]
             [-TargetUUIDs String[]]
             [-Category String[]]
             [-State String[]]
             [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.
-LegacyMode
Returns data in the legacy format.
-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

-TargetUUIDs String[]
Specifies one or more UUIDs of the components to which the task belongs.
Note: The following aliases are accepted for this parameter name for backward compatibility. These aliases will be deprecated in a future release.
  • -TargetUUID

  • -Uuid

-Category String[]
Specifies the categories to which the task belongs. You can specify one or more of the following values, separated by a comma.
  • Backup

  • Configuration

  • Custom

  • Firmware

  • Health

  • Inventory

  • Management

  • OsDeployment

  • OsDriverUpdates

  • OsImport

  • OsProfileExport

  • Power

  • RemoteAccess

  • SelfMaintenance

  • Service

  • SwitchConfiguration

  • SystemID

  • Unknown

-State String[]
Specifies the current states of the task. You can specify one or more of the following values, separated by a comma.
  • Aborted

  • Blocked

  • Cancelled

  • CancelledWithError

  • CancelledWithWarning

  • Cancelling

  • Complete

  • CompleteWithError

  • CompleteWithWarning

  • Expired

  • Initializing

  • Interrupted

  • InterruptedWithError

  • InterruptedWithWarning

  • Investigating

  • Pending

  • Resolved

  • Running

  • RunningWithError

  • RunningWithWarning

  • Skipped

  • Stopped

  • StoppedWithError

  • StoppedWithWarning

  • Unknown

  • Uploading

  • Validating

  • Waiting

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 retrieves all tasks that are currently running.

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

$tasks = Get-LXCATask -State Running,RunningWithError,RunningWithWarning

Disconnect-LXCA

The following example retrieves all tasks from XClarity Administrator using the legacy Lenovo.SysMgmt.LXCA.Integration.Data.TaskData type as returned data.

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

$tasks = Get-LXCATask -LegacyMode

Disconnect-LXCA

Related links