Skip to main content

Get-LXCOJobs

Use this cmdlet to return high-level data for all jobs or a list of jobs, or detailed information for a specific job.

Note
You cannot pipe objects to this cmdlet.

Syntax

Get-LXCOJobs [-Connection LXCOConnection]
[-PageOffset Int32]
[-PageLimit Int32]
[-Name String[]]
[-Status String[]]
[-CreatedBy String[]]
[-Category String[]]
[-Target String[]]
[-StartTimestamp String[]]
[-CompleteTimestamp String[]]
[-Progress String[]]
[CommonParameter]

Get-LXCOJobs [-Connection LXCOConnection]
[-IncludeLogs ]
-IDs Int32[]
[CommonParameter]

Get-LXCOJobs [-Connection LXCOConnection]
-JobID Int32
[-ChildrenLevel Int32]
[-IncludeLogs ]
[CommonParameter]

Parameters

-Connection LXCAConnection
Specifies the connection to the Lenovo XClarity Orchestrator server. If no connection is specified, the result from the last Connect-LXCO cmdlet is used.
-PageOffset Int32
Specifies the page offset at which to start the set of job in the servers job’s list to be returned. The default offset is 0.
-PageLimit Int32
Specifies the number of jobs to return at one time. The default limit is 10.
-Name String[]
Specifies a list of full or partial name text. All jobs that contain the specified pattern are returned.
-Status String[]
Specifies a comma-separated list of job statuses. This can be any of the following values.
  • Aborted
  • Blocked
  • Cancelled
  • CancelledWithErrors
  • CancelledWithWarnings
  • Cancelling
  • Complete
  • CompleteWithErrors
  • CompleteWithWarnings
  • Expired
  • Initializing
  • Interrupted
  • InterruptedWithErrors
  • InterruptedWithWarnings
  • Investigating
  • Pending
  • Resolved
  • Running
  • RunningWithErrors
  • RunningWithWarnings
  • Skipped
  • Stopped
  • StoppedWithErrors
  • StoppedWithWarnings
  • Unknown
  • Uploading
  • Validating
  • Waiting
-CreatedBy String[]
Specifies a list of names of users that created the job.
-Category String[]
Specifies a comma-separated list of categories. This can be any of the following values.
  • Analytics
  • Backup
  • Service
  • Configuration
  • Custom
  • Firmware
  • Health
  • Inventory
  • Management
  • OsDeployment
  • OsDriverUpdates
  • OsImport
  • OsProfileExport
  • Power
  • RemoteAccess
  • SelfMaintenance
  • SwitchConfiguration
  • SystemID
  • SystemID
  • Unknown
-Target String[]
Specifies a comma-separated list of full or partial target names. All jobs that contain the specified pattern are returned.
-StartTimestamp String[]
Specifies the job start dates, as range using the following format: {startDate},{endDate}. The end date is optional. If is not specified, the current date is used by default.
-CompleteTimestamp String[]
Specifies the job completion dates, as range using the following format: {startDate},{endDate}. The end date is optional. If is not specified, the current date is used by default.
-Progress String[]
Specifies a comma-separated list of job progresses. The value cab be in 0 - 100 range.
-IncludeLogs
When specified, the logs for the retrieved jobs are returned, if available.
-IDs Int32[]
Specifies a comma-separated list of jobs IDs that are to be returned. High-level data is returned.
-JobID Int32
Specifies the job ID that are to be returned. Detailed information is returned.
-ChildrenLevel Int32
Specifies the levels of subtasks to return. This can be one of the following values.
  • -1. All subtasks are returned.
  • 0. (default) No subtasks are returned.
  • {number}. The specified level of subtasks is returned.
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 return all jobs that meet the specified filters.
$cred = Get-Credential
Connect-LXCO -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck

$jobs = Get-LXCOJobs -Category Firmware `
-Status RunningWithErrors,RunningWithWarnings `
-Progress 10,50 `
-StartTimestamp "1.10.2022 14:30:00","1.12.2022 11:45:00" `
-CompleteTimestamp "1.10.2022 14:30:00","1.12.2022 11:45:00"
$jobs|Format-List

Disconnect-LXCO
The following example return all specified jobs and the job logs, if available.
$cred = Get-Credential
Connect-LXCO -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck

$jobs = Get-LXCOJobs -IDs 1,4,7,15 -IncludeLogs
$jobs|Format-List

Disconnect-LXCO
The following example return specified job and all its subtasks, and also the job logs are retrieved, if available.
$cred = Get-Credential
Connect-LXCO <span className="ph">-HostUri</span> 192.0.2.0 -Credential $cred -SkipCertificateCheck

$job = Get-LXCOJobs -JobID 1 -ChildrenLevel -1 -IncludeLogs
$job
# show the content of the level 1 subtasks
$job.Children |Format-List

Disconnect-LXC