{"id":2712,"date":"2024-04-03T15:16:45","date_gmt":"2024-04-03T13:16:45","guid":{"rendered":"https:\/\/itsimple.info\/?p=2712"},"modified":"2024-04-03T16:46:02","modified_gmt":"2024-04-03T14:46:02","slug":"how-to-update-hyper-v-configuration-version-with-powershell","status":"publish","type":"post","link":"https:\/\/itsimple.info\/?p=2712","title":{"rendered":"How To Update Hyper-V Configuration Version with Powershell"},"content":{"rendered":"\n<p>By updating VM to the most current configuration version on Hyper-v hosts you get the best compatibility option on the VM making the VM best performance on the virtual environment. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"supported-vm-configuration-versions-for-long-term-servicing-hosts\">Supported VM configuration versions for long-term servicing hosts<\/h3>\n\n\n\n<p>The following table lists the VM configuration versions for hosts running a long-term servicing version of Windows.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Hyper-V host Windows version<\/th><th>10.0<\/th><th>9.3<\/th><th>9.2<\/th><th>9.1<\/th><th>9.0<\/th><th>8.3<\/th><th>8.2<\/th><th>8.1<\/th><th>8.0<\/th><th>7.1<\/th><th>7.0<\/th><th>6.2<\/th><th>5.0<\/th><\/tr><\/thead><tbody><tr><td>Windows Server 2022<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><\/tr><tr><td>Windows 10 Enterprise LTSC 2021<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><\/tr><tr><td>Windows Server 2019<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><\/tr><tr><td>Windows 10 Enterprise LTSC 2019<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><\/tr><tr><td>Windows Server 2016<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><\/tr><tr><td>Windows 10 Enterprise 2016 LTSB<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><\/tr><tr><td>Windows 10 Enterprise 2015 LTSB<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><\/tr><tr><td>Windows Server 2012 R2<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><\/tr><tr><td>Windows 8.1<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><td>?<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>To Check The Hyper-V host Configuration version supported on the host :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Get-VMHostSupportedVersion -ComputerName \"Hyper-v host name\"<\/pre>\n\n\n\n<p>To check the current configuration version running the of all the VM running on one Hyper-v host :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Get-VM -ComputerName \"Hyper-v host name\" * | Format-Table Name, Version<\/pre>\n\n\n\n<p>To upgrade the VM configuration version you first need the shut down the VM, then execute :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Get-VM -ComputerName \"Hyper-V Host Name\" \"VM name\" | Update-VMVersion\n<\/pre>\n\n\n\n<p>Start the VM, You can also check on the Hyper-V manager the current running configuration version <\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"449\" height=\"231\" data-id=\"2713\" src=\"https:\/\/itsimple.info\/wp-content\/uploads\/2024\/04\/Hyperv-ConfigurationVersion.png\" alt=\"\" class=\"wp-image-2713\" srcset=\"https:\/\/itsimple.info\/wp-content\/uploads\/2024\/04\/Hyperv-ConfigurationVersion.png 449w, https:\/\/itsimple.info\/wp-content\/uploads\/2024\/04\/Hyperv-ConfigurationVersion-300x154.png 300w\" sizes=\"auto, (max-width: 449px) 100vw, 449px\" \/><\/figure>\n<\/figure>\n\n\n\n<p>Here is a powershell script that automatically upgrade all the VM&#8217;s on Hyper-v Host from Version 5   <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># Check configuration version of each VM on the Hyper-V host\n$vms = Get-VM\n\nforeach ($vm in $vms) {\n    $vmName = $vm.Name\n    $vmConfigVersion = $vm.Version\n\n    Write-Host \"Virtual Machine: $vmName\"\n    Write-Host \"Configuration Version: $vmConfigVersion\"\n\n    # If configuration version is 5, upgrade it\n    if ($vmConfigVersion -eq \"5.0\") {\n        Write-Host \"Shutting down $vmName...\"\n        Stop-VM -Name $vmName -Force\n\n        # Upgrade configuration version\n        Write-Host \"Upgrading configuration version of $vmName...\"\n        Update-VMVersion -Name $vmName -Force\n\n        # Start the VM\n        Write-Host \"Starting $vmName...\"\n        Start-VM -Name $vmName\n    }\n    else {\n        Write-Host \"$vmName is already on a higher configuration version. Skipping...\"\n    }\n\n    Write-Host \"\"\n}\n<\/pre>\n\n\n\n<figure class=\"wp-block-pullquote has-vivid-green-cyan-color has-text-color has-link-color has-large-font-size wp-elements-913a8d28a4fab8f1d7b7023910a23e04\"><blockquote><p>Good Luck<\/p><\/blockquote><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>By updating VM to the most current configuration version on Hyper-v hosts you get the best compatibility option on the VM making the VM best performance on the virtual environment. Supported VM configuration versions for long-term servicing hosts The following table lists the VM configuration versions for hosts running a long-term servicing version of Windows. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,21,4,12,18,14,15],"tags":[],"class_list":["post-2712","post","type-post","status-publish","format-standard","hentry","category-hyper-v","category-operating-systems","category-tech","category-tutorials","category-virtualization","category-windows","category-windows-server"],"_links":{"self":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/2712","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2712"}],"version-history":[{"count":0,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/2712\/revisions"}],"wp:attachment":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2712"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}