Use PowerCLI to Backup and Restore ESXi Host Configuration

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


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.


Get-vmhost “Host.Domain.local” | Set-VMHostFirmware -Restore -DestinationPath C:download

Or whereever you stored the backup config.

This entry was posted in Vmware and tagged , . Bookmark the permalink.

Leave a Reply