Back up all VMhost configuration
Quick function that pulls the configuration from all of your vmhosts and saves its to a specified location. If you want to tie this down to a specific Datacenter or Cluster just specify it before “Get-VMHost”
Function BackupHosts
{
$FilePath = Read-host " Enter located to save files"
foreach($esxcli in Get-VMHost){
Get-VMHostFirmware -VMHost $esxcli -BackupConfiguration -DestinationPath $FilePath}
}