Backing up all ESXi servers within a single vCenter server

Let's have a look at a simple script that will backup all of your ESXi servers that are connected to a single vCenter Server.

The most simple version of the script will include the following commands:

connect-viserver -server VCSA_FQDN -user [email protected] -password PassW0rd

$esxi_all = get-vmhost

foreach ($esxi in $esxi_all){
Get-VMHostFirmware -vmhost $esxi -BackupConfiguration -DestinationPath c:esxibackups
}

Now, if you check your backup folder, you will see the backups from all ESXi servers.

You can easily tweak the script to save the files in dedicated folders for each ESXi server, and store several versions of the configuration based on your preferences and backup schedule.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.108.168