Quickly Backup ESXi Host Configuration with PowerCLI

Hey Peeps, vNoob Here!

This is something that I think(not sure)  a lot of people are simply not aware exists. You can quickly backup esxi host configuration with PoweCLI.

Before I jump into it, I would remiss if I didn’t mention Cody’s post on backing up ESXi host configurations with vMA/vCLI, which you can find here. However, if you know anything about me and my blog(shameless plug 🙂 ) you know I am a pretty big powercli fan myself.

Anyway! The best part about the PowerCLI way is that is a one-liner!

get-vmhost | get-vmhostfirmware -BackupConfiguration -DestinationPath “C:\Download”

Granted, the part after DestinationPath, you can put any path where you want the backups to be stored. Let’s see it in action!

Easy Peasy! And if you wanted to do it to just one host…

It just doesn’t get much easier than that.

And if you want to restore a host configuration I would simply type something like…

Get-vmhost “host1.lab.local” | Set-VMHostFirmware -Restore -DestinationPath C:\download

Or whereever you stored the backup config.

Awesome Stuff  Huh?!?!?!

Also Since you have read this far, I will let you in on a little secret…..

Today, Pi Day, March 14th, is MY BIRTHDAY!!!!!!!!

Yeah, so there’s that too!!!!

Hope this helps, and I hope you have a great day!!!

 

2 thoughts on “Quickly Backup ESXi Host Configuration with PowerCLI

  • Question? So now that I have all 3 of my hosts built and configured identically save for name and IP and in an HA cluster toghether. Could I use this to create a backup of each host and in the event that I needed to reload esxi 5.5 on a given host I could just use the set-vmhostfirmware command to restore all configurations settings? In particular would this restore all my vswitch settings and iscsi connections?

Comments are closed.