-
-
Save hospitableit/9e700fba8eed8bc1aae0e833a333f475 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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