Update all VMs in a cluster to latest configuration level easily
Find out an easy way to update the Configuration Level of all VMs in a cluster
John Savill
July 1, 2016
1 Min Read
Q. How can I convert all VMs in my Windows cluster to the latest VM configuration version?
A. As new versions of Windows are released the Hyper-V VM configuration level increments such as the new version of Windows Server 2016. Once a cluster is running the new version of Windows Server 2016 you may want to update all VMs to the latest configuration version to enable the new features. An easy way is with the PowerShell below. It will only update VMs that are not running.
$vmgroups = Get-ClusterResource | Where-Object{$_.ResourceType -like "Virtual Machine"} foreach ($vmgroup in $vmgroups) { $VM = $vmgroup | Get-VM #If VM is off and not already version 8.0 if($VM.State -eq "Off") # could add this to only update if not a desired version -and $VM.Version -ne "10.0") { Write-Output "Updating $($VM.VMName)" Update-VMVersion -VM $VM -Force }}
About the Author
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
You May Also Like