top of page

Yorktown High School Class of 2002 Reunion Group

Public·67 members

Create A WMI Filter For Your GPO To Select Server Or Client system _BEST_


Create A WMI Filter For Your GPO To Select Server Or Client system _BEST_

Typically, group policy filtering using WMI (Windows Management Instrumentation) can be used when multiple domain objects (users or computers) are located in the flat AD structure instead of the separate OU, or if you need to apply group policies, according to the OS version, network settings, installed software or any other criteria that can be selected using WMI. When the client processes such a group policy, Windows will check its state for compliance with the specified WMI query, and if the filter conditions are met, the GPO will be applied to this computer.

To create a new WMI filter, open the Group Policy Management console (gpmc.msc and go to Forest -> Domains -> -> WMI Filters. This section contains all WMI filters in the AD domain. Create a new WMI filter (New).

After you have created a WMI filter, you can link it to a specific GPO. Find the desired policy in the GPMC console and on the Scope tab, in the WMI Filtering section drop-down list, select your WMI filter. In this example, I want to apply the printer assignment policy only to computers running Windows 10.

Another example of using a WMI filter for targeting GPO to IP subnets is described in the article Use WMI Filter to Apply GPO to IP Subnet. For example, to apply a policy to clients in the multiple IP subnets, use the WMI query:

You can use the PowerShell to test WMI filters on a computer. Suppose you have written a complex WMI query and want to check if the computer matches this query or not. For example, you created a WMI filter to check for the IE 11 on a computer. You can test this WMI query on the target computer using the get-wmiobject cmdlet:get-wmiobject -query 'SELECT * FROM CIM_DataFile WHERE path="\\Program Files\\Internet Explorer\\" AND filename="iexplore" AND extension="exe" AND version LIKE "11.%"'

For example, you may want to apply certain settings to all your servers on the domain level without having your workstations to apply those settings. One very simple example is the Windows Updates settings. You may want to configure all your servers to check for new updates from your WSUS, and download these updates locally but do not install them until an administrator connects to that computer and manually install them. On the other hand, you may want to configure all your workstations to automatically download and install the updates from WSUS.

You should be familiar with WMI in order understand and to successfully create and apply your WMI filter. The Win32_ComputerSystem Class on MSDN -us/library/aa394102(VS.85).aspx contains all the information we need to create the WMI filter. We need the following table In particular:

Click OK then Save. This filter will select any computer that has either 0 or 1 as a value of the DomainRole, thus our GPO will only apply to workstations. We need to apply this filter to a GPO. Navigate and select any GPO of your choice (the WSUS for example), on the SCOPE tab, on the bottom of the page, under WMI filtering, select your WMI filter from the combo box. This will link the WMI filter to your policy. You can then link your polity to any OU of your choice!

To make sure that each GPO associated with a group can only be applied to devices running the correct version of Windows, use the Group Policy Management MMC snap-in to create and assign WMI filters to the GPO. Although you can create a separate membership group for each GPO, you would then have to manage the memberships of the different groups. Instead, use only a single membership group, and let WMI filters automatically ensure the correct GPO is applied to each device.

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.

To restrict the query to only clients or only servers, add a clause that includes the ProductType parameter. To filter f


Welcome to the group! You can connect with other members, ge...