Skip to main content

Get-LXCOJobs

Use this cmdlet to return high-level data for all jobs or scheduled 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]

Get-LXCOJobs [-Connection LXCOConnection]
-Scheduled
[-ScheduleStatus String[]]
[-CreatedTimestamp String[]]
[-PageOffset Int32]
[-PageLimit Int32]
[-Name String[]]
[-CreatedBy String[]]
[-StartTimestamp String[]]
[CommonParameter]

Get-LXCOJobs [-Connection LXCOConnection]
-ScheduleID String
[CommonParameter]

Parameters

-Connection LXCOConnection
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 comma-separated list of full or partial name text. All jobs that contain one or more of the specified patterns are returned.
-Status String[]
Specifies a comma-separated list of job statuses. This can be one or more 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 comma-separated list of names of users that created the job.
-Category String[]
Specifies a comma-separated list of categories. This can be one or more of the following values.
  • Backup
  • Configuration
  • Custom
  • Discovery
  • Firmware
  • Health
  • Inventory
  • Management
  • ManageOSImage
  • OsDeployment
  • OsDriverUpdates
  • OsProfileExport
  • Power
  • RemoteAccess
  • SelfMaintenance
  • Service
  • SwitchConfiguration
  • SystemID
  • Updates
  • Unknown
-Target String[]
Specifies a comma-separated list of full or partial target names. All jobs that contain one or more of the specified patterns 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 as a percentage. The values can 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.
-Scheduled
When specified, all schedules that match the specified filter are returned.
-ScheduleStatus String[]

Specifies a comma-separated list of schedule statuses. This can be one or more of the following values.

  • Cancelled. The schedule was canceled.
  • Error. An error prevented the job from running on schedule..
  • Launched. The job ran on schedule.
  • Pending. The job is scheduled for a later time.
-CreatedTimestamp String[]
Specifies the schedule creation timestamps as a range, using the following format: <startDate>,<endDate>. The end timestamp is optional. If is not specified, the current timestamp is used by default.
-ScheduleID String
Specifies the schedule ID that is to be 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. Also, job logs are retrieved, if available.
$cred = Get-Credential
Connect-LXCO -Host 192.0.2.0 -Credential $cred -SkipCertificateCheck

$job = Get-LXCOJobs -JobID 1 -ChildrenLevel -1 -IncludeLogs
$job

# shows the content of the level 1 subtasks
$job.Children |Format-List

Disconnect-LXCO

The following example returns all schedules that meet the specified filters.
$cred = Get-Credential
Connect-LXCO -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck

$jobs = Get-LXCOJobs -Scheduled `
-ScheduleStatus Pending,Cancelled `
-Name "XCC" `
-CreatedBy "user" `
-CreatedTimestamp "3/21/2024 1:40:47 PM","3/27/2024 2:40:47 PM" `
-StartTimestamp "3/27/2024 1:40:47 PM","3/28/2024 2:40:47 PM"

$jobs|Format-List

Disconnect-LXCO

The following example returns information about a specific schedule.
$cred = Get-Credential
Connect-LXCO -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck

$job = Get-LXCOJobs -ScheduleID 5281489a50a34acda5ce01f2e6077c14
$job

Disconnect-LXCO