Skip to main content

Get-LXCODevices

This cmdlet returns a list of all managed devices or detailed information about a specific managed device. When a list is returned, the content of the list can be filtered.

Note
You cannot pipe objects to this cmdlet.

Syntax

Get-LXCODevices [-Connection LXCOConnection]
[CommonParameters]

Get-LXCODevices [-Connection LXCOConnection]
-DeviceId String
[CommonParameters]

Get-LXCODevices [-Connection LXCOConnection]
-DeviceType String
[-Status String[]]
[-Connectivity String[]]
[-Power String]
[-IpAddress String[]]
[-Groups String[]]
[-ProductName String[]]
[-TypeModel String[]]
[-FirmwareName String[]]
[-FirmwareBuild String[]]
[-FirmwareVersion String[]]
[-WarrantyStatus String]
[-FirmwareDate String[]]
[CommonParameters]

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.
-DeviceID String
Specifies the ID of the device to return.
-DeviceType String
Specifies the type of devices to return. This can be one of the following values.
  • Chassis
  • Server
  • Storage
  • Switch
-Status String[]
Specifies the health states of devices to return. This can be one or more of the following values, separated by a comma.
  • Normal
  • Warning
  • Critical
  • Unknown
-Connectivity String[]
Specifies the connectivity status of devices to return. This can be one or more of the following values, separated by a comma.
  • Online
  • Offline
  • OfflineManaged
  • Partial
-Power String
Specifies the power status of devices to return. This can be one of the following values.
  • Off
  • On
-IpAddress String[]
Specifies one or more full or partial IP addresses (ipV4 or ipV6), separated by a comma. All devices that contain one or more of the specified pattern are returned.
-Groups String[]
Specifies tone or more full or partial groups names, separated by a comma. All devices that contain one or more of the specified pattern are returned.
-ProductName String[]
Specifies one or more full or partial product names, separated by a comma. All devices that contain one or more of the specified pattern are returned.
-TypeModel String[]
Specifies one or more full or partial machine-type models, separated by a comma. All devices that contain one or more of the specified pattern are returned.
-FirmwareDate String[]
Specifies the firmware release dates as range, using the following format: <startDate>,<endDate>. The end date is optional. If not specified, the current date is used by default.
-FirmwareName String[]
Specifies one or more or partial firmware names, separated by a comma. All devices that contain one or more of the specified pattern are returned.
-FirmwareBuild String[]
Specifies one or more or partial firmware builds, separated by a comma. All devices that contain one or more of the specified pattern are returned.
-FirmwareVersion String[]
Specifies one or more full or partial firmware versions, separated by a comma. All devices that contain one or more of the specified pattern are returned.
-WarrantyStatus String
Specifies the warranty status of devices to return. This can be one of the following values.
  • Active
  • Expired
  • RetrievingData
  • NoData
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 returns a list of all managed devices that meet specified criteria.
$cred = Get-Credential
Connect-LXCO -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck

$result = Get-LXCODevices -DeviceType Server `
-Status Critical,Normal,Warning `
-Connectivity Offline,Online `
-IpAddress 10.24 `
-Groups "not_available" `
-ProductName system `
-FirmwareName xcc,imm2 `
-FirmwareDate "5/20/2020"
$result | Format-List

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

$result = Get-LXCODevices -DeviceID 00632D78DE644E23B712E200FE449787-7AF5D198CECF431AAEC674C7CA5A29B5
$result | Format-List

Disconnect-LXCO
The following example returns list of all managed servers that are in Critical or Warning health state.
$cred = Get-Credential
Connect-LXCO -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck

$result = Get-LXCODevices -DeviceType servers -Status Critical,Normal
$result | Format-List

Disconnect-LXCO