How do I see if a VM is Generation 1 or Generation2?

Use PowerShell to find your VM Generation type

Michael Otey

January 23, 2015

1 Min Read
How do I see if a VM is Generation 1 or Generation2?

With Windows Server 2012 R2 Microsoft introduced new type of VM called Generation 2 VMs. Generation 2 VMs are more efficient than Generation 1 VMs as they eliminate all of the legacy devices. They are also more secure as they support UEFI firmware rather than BIOS firmware. In addition, Generation 2 VMs can PXE boot from a standard network adapter (they don’t require the legacy network adapter) and they can boot from higher performance SCSI virtual hard disks. You can freely mix your Generation 1 and Generation 2 VMs all on the same Hyper-V host. However, sometimes you may want to know which VMs are Generation 1 and which are Generation 2.

To find out you can check the Hyper-V Manager and see if the legacy devices are gone or if the VM is booting from a SCSI controller. However, PowerShell provides a better and faster way to see the Generation type of all of your VMs. You can display the Generation type of a VM using the Generation property which exposed by the VMObject returned by Get-VM cmdlet. In the following example the output of the Get-VM is piped to the Format-List cmdlet. The output will be displayed like you can see below.

PS C:> Get-VM | Format-List Name,Generation

Name       : ORPORTvSQL01
Generation : 1

Name       : ORPORTvSQL02
Generation : 1

Name       : SQL2012Base
Generation : 1

Name       : WS2012Gen2
Generation : 2

Name       : XenDesktopWin7
Generation : 1

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