Group Policy

Create WMI Filters for the GPO

Hello All,

Hope this post finds you in good health and spirit. To ensure that any GPO associated with a group may only be deployed to devices running the relevant version of Windows, create and add WMI filters to the GPO using the Group Policy Management MMC snap-in. Although you can create a separate membership group for each GPO, you must then manage the memberships of the various groups.

Instead, use a single membership group and allow WMI filters guarantee that the relevant GPO is applied to each device automatically. Administrative credentials To execute these processes, you must be a member of the Domain Administrators group or have been assigned GPO modification authority. Create the WMI filter first, and then configure it to check for a certain version (or versions) of the Windows operating system.

To create a WMI filter that queries for a specified version of Windows

  • Open the Group Policy Management console.
  • In the navigation pane, expand Forest: YourForestName, expand Domains, expand YourDomainName, and then select WMI Filters.
  • Select Action, and then select New.
  • In the Name text box, type the name of the WMI filter. Be sure to use a name that clearly indicates the purpose of the filter. Check to see if your organization has a naming convention.
WMI-Filtering
WMI-Filtering
  • In the Description text box, type a description for the WMI filter. For example, if the filter excludes domain controllers, you might consider stating that in the description.
  • Select Add.
WMI-Query
WMI-Query
  • Leave the Namespace value set to root\CIMv2.
  • In the Query text box, type:
SELECT * FROM Win32_OperatingSystem WHERE Caption = "Microsoft Windows 8.1 Enterprise"

For devices running at least Windows Vista and Windows Server 2008, this query will return true. Use “6.2%” to limit your search to Windows 8 and Windows Server 2012. Use “10.%” for Windows 11, Windows 10, and Windows Server 2016. To indicate several versions, use or, as seen in the following:

... where Version like "6.1%" or Version like "6.2%"

After you have created a filter with the correct query, link the filter to the GPO. Filters can be reused with many GPOs simultaneously; you do not have to create a new one for each GPO if an existing one meets your needs.

  • Open the Group Policy Management console.
  • In the navigation pane, find and then select the GPO that you want to modify.
  • Under WMI Filtering, select the correct WMI filter from the list.
WMI-Filter-Applying-to-GPO
WMI-Filter-Applying-to-GPO
  • Select Yes to accept the filter.

So, that’s all in this blog. I will meet you soon with next stuff. Have a nice day!!!

Guys please don’t forget to like and share the post. Also join our WindowsTechno Community and where you can post your queries/doubts and our experts will address them.

You can also share the feedback on below windows techno email id.

If you have any questions feel free to contact us on admin@windowstechno.com also follow us on facebook@windowstechno to get updates about new blog posts.

How useful was this post?

Click on a star to rate it!

As you found this post useful...

Follow us on social media!

Was this article helpful?
YesNo

Vipan Kumar

He is an Active Directory Engineer. He has been working in IT industry for more than 10 years. He is dedicated and enthusiastic information technology expert who always ready to resolve any technical problem. If you guys need any further help on subject matters, feel free to contact us on admin@windowstechno.com Please subscribe our Facebook page as well website for latest article. https://www.facebook.com/windowstechno
Back to top button