You can reboot and shut down managed and standalone hosts. The ShutdownHost_Task method is not supported on all hosts. Check the host capability shutdownSupported.

You can call both methods with a force parameter, which specifies whether to reboot hosts even when virtual machines are running or other operations are in progress on the host. If you set the parameter to false, hosts are rebooted only when they are in maintenance mode.

  • ShutdownHost_Task – Shuts down a host. If connected directly to the host, the client never receives an indicator of success in the returned task, but temporarily loses connection to the host. If the method does not succeed, an error is returned.
  • RebootHost_Task – Reboots a host. If the command is successful, then the host has been rebooted. Clients connected directly to the host do not receive an indication of success in the returned task, but temporarily lose connection to the host. If the method does not succeed, an error is returned.