WMI Abfragen Server Betriebssysteme

Per WMI Abfrage das OS Server Betriebssystem bestimmen

ANY WINDOWS SERVER OS
Any Windows Server OS
select * from Win32_OperatingSystem where (ProductType = “2”) OR (ProductType = “3”)
Any Windows Server OS – 32-bit
select * from Win32_OperatingSystem where (ProductType = “2”) OR (ProductType = “3”) AND NOT OSArchitecture = “64-bit”
Any Windows Server OS – 64-bit
select * from Win32_OperatingSystem where (ProductType = “2”) OR (ProductType = “3”) AND OSArchitecture = “64-bit”
Any Windows Server – Domain Controller
select * from Win32_OperatingSystem where (ProductType = “2”)
Any Windows Server – Domain Controller – 32-bit
select * from Win32_OperatingSystem where (ProductType = “2”) AND NOT OSArchitecture = “64-bit”
Any Windows Server – Domain Controller – 64-bit
select * from Win32_OperatingSystem where (ProductType = “2”) AND OSArchitecture = “64-bit”
Any Windows Server – Non-Domain Controller
select * from Win32_OperatingSystem where (ProductType = “3”)
Any Windows Server – Non- Domain Controller – 32-bit
select * from Win32_OperatingSystem where (ProductType = “3”) AND NOT OSArchitecture = “64-bit”
Any Windows Server – Non-Domain Controller – 64-bit
select * from Win32_OperatingSystem where (ProductType = “3”) AND OSArchitecture = “64-bit”

WINDOWS SERVER 2008
Windows Server 2008 – DC
select * from Win32_OperatingSystem WHERE Version like “6.0%” AND ProductType=”2″
Windows Server 2008 – non-DC
select * from Win32_OperatingSystem WHERE Version like “6.0%” AND ProductType=”3″
Windows Server 2008 – 32-bit – DC
select * from Win32_OperatingSystem WHERE Version like “6.0%” AND ProductType=”2″ AND NOT OSArchitecture = “64-bit”
Windows Server 2008 – 32-bit – non-DC
select * from Win32_OperatingSystem WHERE Version like “6.0%” AND ProductType=”3″ AND NOT OSArchitecture = “64-bit”
Windows Server 2008 – 64-bit – DC
select * from Win32_OperatingSystem WHERE Version like “6.0%” AND ProductType=”2″ AND OSArchitecture = “64-bit”
Windows Server 2008 – 64-bit – non-DC
select * from Win32_OperatingSystem WHERE Version like “6.0%” AND ProductType=”3″ AND OSArchitecture = “64-bit”

WINDOWS SERVER 2008 R2
Windows Server 2008 R2 – 64-bit – DC
select * from Win32_OperatingSystem WHERE Version like “6.1%” AND ProductType=”2″
Windows Server 2008 R2 – 64-bit – non-DC
select * from Win32_OperatingSystem WHERE Version like “6.1%” AND ProductType=”3″

WINDOWS SERVER 2012
Windows Server 2012 – 64-bit – DC
select * from Win32_OperatingSystem WHERE Version like “6.2%” AND ProductType=”2″
Windows Server 2012 – 64-bit – non-DC
select * from Win32_OperatingSystem WHERE Version like “6.2%” AND ProductType=”3″

WINDOWS SERVER 2012 R2
Windows Server 2012 R2 – 64-bit – DC
select * from Win32_OperatingSystem WHERE Version like “6.3%” AND ProductType=”2″
Windows Server 2012 R2 – 64-bit – non-DC
select * from Win32_OperatingSystem WHERE Version like “6.3%” AND ProductType=”3″

WINDOWS SERVER 2016
Windows Server 2016 – 64-bit – DC
select * from Win32_OperatingSystem WHERE Version like “10.0%” AND ProductType=”2″
Windows Server 2016 – 64-bit – non-DC
select * from Win32_OperatingSystem WHERE Version like “10.0%” AND ProductType=”3″