In this article, I will explain how to backup ESXi configuration with VMware PowerCLI. We will go through the PowerCLI commands, which can work for Windows users. VMware PowerCLI is a set of PowerShell that you can use to backup the ESXi configuration.
If you are running a VMware environment, you should likely know that having regular backups is essential to keeping the virtual environment protected and data recoverable. That is why you should know about the different backup techniques that include ESXi configurations to be able to restore VMware ESXi configurations in case something goes wrong. You can use the ESXi command-line interface, VMware PowerCLI, and vSphere CLI. In addition, you can backup and restore the ESXi configuration data manually in case other methods become unreachable.
In some situations, you may want to backup or restore the configuration of your ESXi server. This can be performed with various tools with GUI front end or you can use tools directly built into ESXi and vSphere.
PowerCLI is one of the best tools that are bundled for free with the VMware environment and must be installed on the management station or on the vCenter server (if Windows-based). You can download the latest PowerCLI from VMware. The procedure of backing up and restoring the configuration of ESXi is very simple. Scripting guys call it one-liner.
Table of Contents
Open VMware PowerCLI and then connect to ESXi host or vCenter with the below command.
Note that during the first connection, you will have to enable remote signing of scripts with a command.
connect-viserver –server [Server Name or IP Address]
Specify ESXi host credentials, and then choose OK.
The ESXi server successfully connected.
Backup ESXi Configuration with PowerCLI
Now you can enter the backup command. I have a download directory in my C drive.
get-vmhost | get-vmhostfirmware -BackupConfiguration -DestinationPath “C:\Download”
You will get the configBundle ESXi configuration backup file in a C:\download folder.
In this article, we reviewed how to backup the ESXi hosts by using VMware PowerCLI. Though you can also take a backup using the ESXi command line or vSphere CLI,. Alternatively, you can backup and restore your ESXi servers manually when you cannot use the command line or your ESXi server is not booting.