Get-LXCADeviceMaintenance

This cmdlet retrieves maintenance status and schedules for a specific device.

Note:
  • Schedules (start and end dates) that are returned for the device are translated to the time zone of the local system.

  • You cannot pipe objects to this cmdlet.

Syntax

Get-LXCADeviceMaintenance [-Connection LXCAConnection] 
                           -UUID 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.
-UUID String
Specifies the UUID of the device to check the maintenance status.
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

This cmdlet returns Lenovo.SysMgmt.LXCA.Integration.Data.DeviceMaintenanceStatus object.

If the device is not in maintenance mode, an exception with message 404 - Not Found is thrown, and the DeviceMaintenanceStatus object has State property set to "Unknown."

Examples

The following example retrieves maintenance status of a specific device.

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

$deviceUUID = "000123444"
$(Get-LXCADeviceMaintenance -UUID $deviceUUID)

Disconnect-LXCA