If you need to restore the ESXi server, perform the following steps:
- Launch PowerCLI
- Connect to the destination ESXi server using Connect-VIserver
- Place the host in maintenance mode using Set-VMhost ESXi-name -State Maintenance
- Restore the configuration through Set-VMhostFirmware
It might look as though something went wrong, and the restore operation did not happen, but this is not the case. Again, immediately after issuing this command, the host initializes the reboot cycle, so PowerCLI loses its connection to the ESXi server.