Skip to content

Instantly share code, notes, and snippets.

Created February 23, 2019 04:54
What would you like to do?
# Change these variables to suit your environment
$ESXiHost = ""
$BackupFile = "d:\Backups\ESXi\"
$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