The following post will guide you through the steps necessary to backup Esxi host configuration with PowerCLI
Steps :
1. first you need to download the vSphere PowerCLI – installer
2. Open Powershell and Type: Add-PSSnapin VMware.VimAutomation.Core
Or, for all commands, run the script:
"C:Program Files (x86)VMwareInfrastructurevSphere PowerCLIScriptsInitialize-PowerCLIEnvironment.ps1"
3. Connect to the Server : Type "Connect-VIServer" and type server IP and credentials
Or, for all commands, run the script:
"C:Program Files (x86)VMwareInfrastructurevSphere PowerCLIScriptsInitialize-PowerCLIEnvironment.ps1"
4. Backup:
get-vmhost "Host.Domain.local"| get-vmhostfirmware -BackupConfiguration -DestinationPath “C:\BackupHost”
*BackupHost is a directory that I created, you can put any path where you want the backups to be stored.
5.Restore:
Get-vmhost “Host.Domain.local” | Set-VMHostFirmware -Restore -DestinationPath C:download
Or whereever you stored the backup config.