Skip to content

Instantly share code, notes, and snippets.

@hospitableit
Created February 23, 2019 04:54
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
# Change these variables to suit your environment
$ESXiHost = "esxihost.mynetwork.com"
$BackupFile = "d:\Backups\ESXi\configBundle-esx02.mynetwork.com.tgz"
$ESXiUserName = "ESXi Username"
$ESXiPassword = "ESXi Password"
#Connect to the ESXi host
Connect-VIServer -Server $ESXiHost
#Put the ESXi Host into Maintenance Mode
Set-VMHost -VMHost $ESXiHost -State 'Maintenance'
#Restore the configuration
Set-VMHostFirmware -VMHost $ESXiHost -Restore -SourcePath $BackupFile -HostUser $ESXiUserName -HostPassword $ESXiPassword
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment