Forum Discussion
SimonEE
Feb 11, 2021Copper Contributor
WMI filter for Windows 10 Enterprise
Hi all,
To explain the very basics, I have a client who is migrating from Windows 10 Pro to Enterprise due to a functionality issue. Due to the pandemic/ lockdown they initially converted from Pro to Enterprise using MAK keys and now want to point these back to the KMS server. Changing this is a doddle. However, it would make everyone's lives easier to implement this with a GPO logon script with a WMI filter for 'Windows 10 Enterprise'. I have done a fair bit of research but unable to find anything concrete in regard to the query I would need to enter when configuring the new WMI filter.
Has anyone managed to achieve this? I have admittedly not done much work with creating WMI filters before.
Thanks in advance
SimonEE I find WMI Explorer really useful when writing WMI filters: GitHub - vinaypamnani/wmie2
You'll want to target ROOT\cimv2 on the filter and this should do the job:
select * from Win32_OperatingSystem where Caption = "Microsoft Windows 10 Enterprise"
Alternatively you can target the Version and OperatingSystemSKU properties:
select * from Win32_OperatingSystem where Version like "10.%" AND OperatingSystemSKU = 27
(I'm taking "27" from a list of OperatingSystemSKU values off Microsoft Docs but I'd look it up in WMI Explorer to double check, or using PowerShell on a system running Win 10 Enterprise:
get-wmiobject -query "SELECT OperatingSystemSKU from Win32_OperatingSystem"
and look at the value it returns.)
SimonEE I find WMI Explorer really useful when writing WMI filters: GitHub - vinaypamnani/wmie2
You'll want to target ROOT\cimv2 on the filter and this should do the job:
select * from Win32_OperatingSystem where Caption = "Microsoft Windows 10 Enterprise"
Alternatively you can target the Version and OperatingSystemSKU properties:
select * from Win32_OperatingSystem where Version like "10.%" AND OperatingSystemSKU = 27
(I'm taking "27" from a list of OperatingSystemSKU values off Microsoft Docs but I'd look it up in WMI Explorer to double check, or using PowerShell on a system running Win 10 Enterprise:
get-wmiobject -query "SELECT OperatingSystemSKU from Win32_OperatingSystem"
and look at the value it returns.)