Backup ESXi Host Configuration
Download and install the VMware Power CLI module for Power Shell.
Execute the following command to enable remote signed scripts
Execute the following code to connect to vCentre or ESXi host
Connect-VIServer -Server vcenter01 -User admin -Password pass
Execute the following code to download the host configuration data for all hosts in vCentre or on the ESXi host.
get-vmhost | get-vmhostfirmware -BackupConfiguration -DestinationPath “C:Download”
To restore the host configuration to an ESXi host first put it in maintenance mode via the vSphere Client or via the Power CLI.
Set-VMHost -VMHost esxi5-03.lab.local -State “Maintenance”
Next execute the following command to restore a hosts configuration.