SOLVED

WMI filter for Windows 10 Enterprise

%3CLINGO-SUB%20id%3D%22lingo-sub-2121820%22%20slang%3D%22en-US%22%3EWMI%20filter%20for%20Windows%2010%20Enterprise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2121820%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20explain%20the%20very%20basics%2C%20I%20have%20a%20client%20who%20is%20migrating%20from%20Windows%2010%20Pro%20to%20Enterprise%20due%20to%20a%20functionality%20issue.%20Due%20to%20the%20pandemic%2F%20lockdown%20they%20initially%20converted%20from%20Pro%20to%20Enterprise%20using%20MAK%20keys%20and%20now%20want%20to%20point%20these%20back%20to%20the%20KMS%20server.%20Changing%20this%20is%20a%20doddle.%20However%2C%20it%20would%20make%20everyone's%20lives%20easier%20to%20implement%20this%20with%20a%20GPO%20logon%20script%20with%20a%20WMI%20filter%20for%20'Windows%2010%20Enterprise'.%20I%20have%20done%20a%20fair%20bit%20of%20research%20but%20unable%20to%20find%20anything%20concrete%20in%20regard%20to%20the%20query%20I%20would%20need%20to%20enter%20when%20configuring%20the%20new%20WMI%20filter.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHas%20anyone%20managed%20to%20achieve%20this%3F%20I%20have%20admittedly%20not%20done%20much%20work%20with%20creating%20WMI%20filters%20before.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%26nbsp%3B%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fhtml%2F%408341BD79091AF36AA2A09063B554B5CD%2Fimages%2Femoticons%2Fsmile_40x40.gif%22%20alt%3D%22%3Asmile%3A%22%20title%3D%22%3Asmile%3A%22%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2121820%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EGPO%20Team%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%2010%20Enterprise%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ewmi%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2122018%22%20slang%3D%22en-US%22%3ERe%3A%20WMI%20filter%20for%20Windows%2010%20Enterprise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2122018%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F963686%22%20target%3D%22_blank%22%3E%40SimonEE%3C%2FA%3E%26nbsp%3BI%20find%20WMI%20Explorer%20really%20useful%20when%20writing%20WMI%20filters%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fvinaypamnani%2Fwmie2%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EGitHub%20-%20vinaypamnani%2Fwmie2%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou'll%20want%20to%20target%20ROOT%5Ccimv2%20on%20the%20filter%20and%20this%20should%20do%20the%20job%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eselect%20*%20from%20Win32_OperatingSystem%20where%20Caption%20%3D%20%22Microsoft%20Windows%2010%20Enterprise%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlternatively%20you%20can%20target%20the%20Version%20and%20OperatingSystemSKU%20properties%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eselect%20*%20from%20Win32_OperatingSystem%20where%20Version%20like%20%2210.%25%22%20AND%20OperatingSystemSKU%20%3D%2027%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E(I'm%20taking%20%2227%22%20from%20a%20list%20of%20OperatingSystemSKU%20values%20off%20Microsoft%20Docs%20but%20I'd%20look%20it%20up%20in%20WMI%20Explorer%20to%20double%20check%2C%20or%20using%20PowerShell%20on%20a%20system%20running%20Win%2010%20Enterprise%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eget-wmiobject%20-query%20%22SELECT%20OperatingSystemSKU%20from%20Win32_OperatingSystem%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20look%20at%20the%20value%20it%20returns.)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

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 :smile:

1 Reply
best response confirmed by SimonEE (Occasional Visitor)
Solution

@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.)

 

 

www.000webhost.com