Monday, May 23, 2011

Group Policy Objects (GPO) and WMI Filter

As you know, Windows Management Instrumentation (WMI) filters allow you to dynamically determine the scope of Group Policy objects (GPOs) based on attributes of the target computer. I started seeing many questions about verifying these WMI Filters prior to implementing it. You can use the wbemtest tool to verify the result.

More info about wbemtest tool - http://technet.microsoft.com/en-us/library/ee692770.aspx

In this example my goal is to verify an IP address using a WMI query. 

1.  Open wbemtest tool (Run -> type wbemtest)

2.  On the Windows Management Instrumentation Tester window, select Connect.

Note: For the local machine, click Connect with correct Namespace. For a remote computer, use the \\Remte\root\cimv2 format.

image

3.  Select Query button. 

image

4.  Enter your query string in the Enter Query box and click Apply

Note: In the below example, I am searching for 10.15.2.X IP address in the IP V4 Windows Routing Table. 

image

When a GPO that is linked to a WMI filter is applied on the target computer, the filter is evaluated on the target computer. If the WMI filter evaluates to false, the GPO is not applied (except if the client computer is running Windows 2000, in which case the filter is ignored and the GPO is always applied).  If the WMI filter evaluates to true, the GPO is applied.

As you can see in the following screenshot, the select * from Win32_IP4RouteTable Where Name Like "192.168.10.%" query returns a True value. 

image

In this example, select * from Win32_IP4RouteTable Where Name Like "192.168.10.%" query returns a  False value. 

image

 
 
 
 
 

2 comments:

Hi I have created a new property for Win32_UserAccount class and named it as "Department". I want to link the value of the user's department attribute to this property . How to do this. I think it is possible because the value of user's name attribute is linked to the property Name in the Win32_UserAccount Class. Please help me with this.

Colombia has a diverse and rich racial composition, which is why women have colombian brides different appearances. But usually they have a sensual body color with tanned or olive skin. Nothing compares to family and they believe that no money can buy that which is enduring and steady in a relationship with a man.

Post a Comment

Popular Posts

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More