Skip to main content

ospower command

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

ospower command syntax

OneCli.exe [misc] ospower <cmds> [<options>]
Table 1. ospower commands and examples
CommandSyntax exampleDescription
acpower
OneCli.exe ospower acpower
--bmc userid:password@ host
Remotely perform AC power cycle by inputting --bmc user:password@host:port.
boottosetup
OneCli.exe ospower boottosetup
--bmc userid:password@ host
Restart the host server to make the UEFI setting take effect.
reboot
OneCli.exe ospower
reboot --bmc userid:
password@host
  • Restart the host server OS.
  • Restart the remote host OS by inputting --bmc user:password@host:port.
  • Restart only works if the current power state is on.
state
OneCli.exe misc ospower
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.
turnoff
OneCli.exe ospower turnoff
--bmc userid:password@
host
  • Turn off the host server OS.
  • Turn off the remote host OS by inputting --bmc user:password@host:port.
turnon
OneCli.exe ospower turnon
--bmc userid:password@
host
  • Turn on the host server OS.
  • Turn on the remote host OS by inputting --bmc user:password@host:port.
Table 2. ospower command specific parameters
ParameterRequired/OptionalNotes
  • --bmc, -b

  • --bmc-cim-port, -p

  • --bmc-password, -w

  • --bmc-username, -u

  • --check-trust, -C

  • --config

  • --never-check-trust, -N

  • --nolog

  • --output, -o

Optional

Refer to Table 2.

Example of the state command

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