#Select the host you want to back up $Computer = Read-Host "Please enter the VM host name" #Enter the root password $Userpass = Read-Host "Please Enter the Root Password" # Enter the location where you will be storing the backups. Can be local or file share $location = Read-host "enter the location where you will be storing the backups. Can be local or file share" #Select to backup or restore the host. $Backup = Get-VMHostFirmware -VMHost $Computer -BackupConfiguration "$Location" -HostUser root -HostPassword $Userpass $Restore = Set-VMHostFirmware -VMHost $Computer -Restore -SourcePath "$Location\Configbundle-$Computer.TGZ" -HostUser root -HostPassword $Userpass
From novice to tech pro — start learning today.