Skip to main content

power command

Use the power commands to forcely or normally power on, power off, and restart host OS, and display the power status of the host server OS. The power commands support in-band mode and out-of-band mode.

power command syntax

OneCli.exe [misc] power<cmds> [<options>]
Table 1. power commands and examples
CommandSyntax exampleDescription
accycle
OneCli.exe power accycle
--bmc userid:password@ host
Perform AC power cycle.
boottosetup
OneCli.exe power boottosetup
--bmc userid:password@ host
Restart the host server to make the UEFI setting take effect.
dccycle
OneCli.exe power dccycle
--bmc userid:password@ host
Perform DC power cycle.
  • If the server is powered off, run this command to power on the server through BMC.

  • If the server is powered on, run this command to perform DC power cycle through BMC.

forceoff
OneCli.exe power forceoff 
--bmc userid: password@host
  • Power off the local host OS immediately.

  • Power off the remote host OS immediately by inputting --bmc user:password@host:port..

forcerestart
OneCli.exe power forcestart
--bmc userid:password@ host
Restart server immediately.
  • If the server is powered off, run this command to power on the server through BMC.

  • If the server is powered on, run this command to forcely restart the server through BMC.

normaloff
OneCli.exe misc power normaloff 
--bmc userid: password@host
  • Power off the local host OS normally.

  • Power off the remote host OS normally by inputting --bmc user:password@host:port..

normalrestart
OneCli.exe power normalrestart
--bmc userid:password@ host
Restart server normally.
  • If the server is powered off, run this command to power on the server through BMC.

  • If the server is powered on, run this command to gracefully restart the server through BMC.

on
OneCli.exe power on
--bmc userid:password@ host
Power on the server.
state
OneCli.exe misc power state 
--bmc userid:password@host
  • Check the host server OS power status.
  • Check the power status of the remote host OS by inputting --bmc user:password@host:port.
triggernmi
OneCli.exe power triggernmi
--bmc userid:password@ host
Trigger NMI.
Table 2. power command specific parameters
ParameterRequired/OptionalNotes
--quietOptionalAnswer yes for all questions and display less screen output as needed.
  • --bmc, -b

  • --bmc-password, -w

  • --bmc-username, -u

  • --bmc-rest-port, -p

  • --check-trust, -C

  • --config

  • --never-check-trust, -N

  • --nolog

  • --output, -o

  • --help, -h

Optional

Refer to Table 2.

Example of the state command

OneCli.exe power state --bmc userid:passwordD@host