Windows Server 2012 DC select * from Win32_OperatingSystem where Version like "6.2%" and ProductType = "2" Windows Server 2012 select * from Win32_OperatingSystem where Version like "6.2%" and ProductType = "3" Windows 8 select * from Win32_OperatingSystem where Version like "6.2%" and ProductType = "1" Windows Server 2008 R2 select * from Win32_OperatingSystem where Version like "6.1%" and ProductType = "3" Windows Server 2008 R2 DC select * from Win32_OperatingSystem where Version like "6.1%" and ProductType = "2" Windows 7 select * from Win32_OperatingSystem where Version like "6.1%" and ProductType = "1" Windows Server 2008 select * from Win32_OperatingSystem where Version like "6.0%" and ProductType = "3" Windows Server 2008 DC select * from Win32_OperatingSystem where Version like "6.0%" and ProductType = "2" Windows Vista select * from Win32_OperatingSystem where Version like "6.0%" and ProductType = "1" Windows Server 2003 select * from Win32_OperatingSystem where Version like "5.2%" and ProductType = "3" Windows XP select * from Win32_OperatingSystem where (Version like "5.1%" or Version like "5.2%") and ProductType = "1"
Very useful for GPO
Something like this is even better
select * from Win32_OperatingSystem WHERE ((Version like "6.1%" and ProductType = "1") OR (Version like "6.2%" and ProductType = "1"))