Set-LXCADeviceMaintenance
This cmdlet modifies maintenance status and schedules for a specific device.
Note
You cannot pipe objects to this cmdlet.
Syntax
Set-LXCADeviceMaintenance [-Connection LXCAConnection]
-UUID String
-Maintenance String
[-EndTime DateTime]
[-StartTime DateTime]
[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 modify the maintenance status.
- -Maintenance String
- Specifies the new maintenance status of the device. You can specify one of the following values.
Enabled
Disabled
- -EndTime DateTime
- Specifies when the device maintenance will end.
If -EndTime is not specified and new maintenance value is
Enabled
, the device remains in maintenance until the maintenance will be disabled.If new maintenance value is
Disabled
, this parameter is ignored.
- -StartTime DateTime
- Specifies when the device maintenance will start.
If -StartTime is not specified and new maintenance value is
Enabled
, the device goes in maintenance immediately.If new maintenance value is
Disabled
, this parameter is ignored.
- 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 does not return data.
Examples
The following example put one device in maintenance for 3 hours, starting 2 hours from now.
$cred = Get-Credential
Connect-LXCA -Host 192.0.2.0 -Credential $cred
$deviceUUID = "000123444"
Set-LXCADeviceMaintenance -UUID $deviceUUID -Maintenance Enabled `
-StartTime (Get-Date).AddHours(2)`
-EndTime (Get-Date).AddHours(5)
Disconnect-LXCA
Give documentation feedback