Invoke-LXCASystemAction
This cmdlet powers on, powers off, restarts, or virtually reseats a target device (CMM, server, switch, or storage controller).
This cmdlet starts a job that runs in the background to perform the operation. The cmdlet response is a URI in the form /tasks/{task_id} (for example, /tasks/12) that represents the job that is created to perform this request. You can use Get-LXCATask -TaskUIDs {task_uuid_list} to monitor the status and progress of the job.
You cannot pipe objects to this cmdlet.
The following parameters are deprecated and will be removed at a future date. Use -DeviceUUID instead.
- -CMMUuid
- -ComputeNodeUuid
- -CanisterUuid
- -IOSwitchUuid
- -RackServerUuid
- -ThinkServerUuid
- -RackSwitchUuid
- -StorageUuid
The following parameters are deprecated and will be removed at a future date. Use -ServerAction instead.
- -ComputeNodeAction
- -RackServerAction
- -ThinkServerAction
Syntax
Invoke-LXCASystemAction [-Connection LXCAConnection]
-DeviceUUID String
[-Force]
[-Schedule ScheduleObject]
-CMMAction String
[-FirmwareUpdate]
[-WhatIf]
[-Confirm]
[CommonParameter]
Invoke-LXCASystemAction [-Connection LXCAConnection]
-DeviceUUID String
[-Force]
[-Schedule ScheduleObject]
-ServerAction String
[-FirmwareUpdate]
[-WhatIf]
[-Confirm]
[CommonParameter]
Invoke-LXCASystemAction [-Connection LXCAConnection]
-DeviceUUID String
[-Force]
[-Schedule ScheduleObject]
-CanisterAction String
[-WhatIf]
[-Confirm]
[CommonParameter]
Invoke-LXCASystemAction [-Connection LXCAConnection]
-DeviceUUID String
[-Force]
[-Schedule ScheduleObject]
-IOSwitchAction String
[-FirmwareUpdate]
[-WhatIf]
[-Confirm]
[CommonParameter]
Invoke-LXCASystemAction [-Connection LXCAConnection]
-DeviceUUID String
[-Force]
[-Schedule ScheduleObject]
-RackSwitchAction String
[-FirmwareUpdate]
[-WhatIf]
[-Confirm]
[CommonParameter]
Invoke-LXCASystemAction [-Connection LXCAConnection]
-DeviceUUID String
[-Force]
[-Schedule ScheduleObject]
-StorageAction String
-ControllerId String
[-WhatIf]
[-Confirm]
[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.
- -DeviceUUID String
- Specifies the UUID of a device on which to perform the system action.
- -ControllerId String
- Specifies the controller on which you want to take action. You can specify one of the following values:
- A. Top controller
- B. Bottom controller
- -CanisterAction String
- Specifies the action to be performed on the specified storage controller (canister). You can specify one of the following actions:
- PowerOn
- PowerOff
- Restart
- -CMMAction String
- Specifies the action to be performed on the specified CMM. You can specify the following actions:
- Restart
- -IOSwitchAction String
- Specifies the action to be performed on the specified Flex switch. You can specify one of the following actions:
- PowerOn
- PowerOff
- Restart
- -RackSwitchAction String
- Specifies the action to be performed on the specified RackSwitch switch. You can specify one of the following actions:
- Restart
- -ServerAction String
- Specifies the action to be performed on the specified ThinkAgile, ThinkEdge, ThinkSystem, Converged, NeXtScale, or System x server. You can specify one of the following actions:
- PowerOn
- PowerOff
- Restart
- ShutdownOSandPowerOff
- ShutdownOSandRestart
- RestartWithNMI (non-maskable Interrupt)
- ResetBMC
- VirtualReseat (for device in a chassis)
- -StorageAction String
- Specifies the action to be performed on the specified storage device. You can specify one of the following actions:
- PowerOn
- PowerOff
- Restart
- -FirmwareUpdate
- When specified, the cmdlets perform power actions during a firmware update.
- -Force
- When specified, the cmdlet performs the system action without first prompting for confirmation.
- -Schedule ScheduleObject
- Creates a scheduled job (task) for this cmdlet on the XClarity Administrator server.
- 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
System.String
If -Schedule is not specified, this cmdlet return a string that contains the URI in the form /tasks/{task_id} (for example, /tasks/12) of the job that it was created to perform the request. You can use Get-LXCATask -TaskUIDs {task_uuid_list} to monitor the status and progress of the job.
Lenovo.SysMgmt.LXCA.Integration.Data.LXCASchedule
If -Schedule is specified, this cmdlet returns a LXCASchedule object that contains details about the schedule just created.
Examples
- The following example powers on a specific server.
$cred = Get-Credential
Connect-LXCA -Host 192.0.2.0 -Credential $cred
$taskUri = Invoke-LXCASystemAction –DeviceUuid AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA `
–ServerAction PowerOn `
-Force
# show task URI
$taskUri
Disconnect-LXCA - The following example restarts a device during a firmware update.
$cred = Get-Credential
Connect-LXCA -Host 192.0.2.0 -Credential $cred
$taskUri = Invoke-LXCASystemAction –DeviceUuid AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA `
–ServerAction Restart `
-FirmwareUpdate `
-Force
# show task URI
$taskUri
Disconnect-LXCA - The following example schedules a power on action on a specific server.
$cred = Get-Credential
Connect-LXCA -Host "192.0.2.0" -Credential $Cred -SkipCertificateCheck
$schedule = New-LXCAScheduleObj -ScheduleName "server schedule" `
-OccurrenceDate (Get-Date).AddMinutes(15)
$result = Invoke-LXCASystemAction -DeviceUuid AAAAAAAAAAAA `
-ServerAction PowerOn `
-Schedule $schedule
-Force
# show created schedule
$result
Disconnect-LXCA