none
GPO WMI Filtering

    Question

  • I have created a GPO with some policies and linked to an OU, it works properly expect all the computers in the OU will apply the policy and I don't want that. We want this GPO to apply only on Windows 7 clients in this OU. I have searched and found that there is a WMI Filtering option which can meet the requirement. Can you tell me the detailed steps?

    Tuesday, August 30, 2016 9:22 AM

Answers

  • Hi,

    Here is how to create a WMI filter:

    https://technet.microsoft.com/en-us/library/cc754488(v=ws.10).aspx

    Go to your GPMC to create the WMI filter.

    For Windows 7 use

    select * from Win32_OperatingSystem where Version like "6.1%"and ProductType = "1"

    Then go to your policy to apply the filter.

    FrenchITGuy.com

    • Marked as answer by bill gao Wednesday, August 31, 2016 12:33 AM
    Tuesday, August 30, 2016 9:37 AM
  • Hi,

    Thanks for your post.

    Please refer to the steps below:
    1. Open GPMC on the domain controller.
    2. In the navigation pane, expand Forest: YourForestName, expand Domains, expand YourDomainName, and then click WMI Filters.

    3. Right-click on the WMI Filter item and choose New. In the Name text box, type the name of the WMI filter, such as Windows 7. In the Description text box, type a description for the WMI filter, such as Windows 7.
    4. Leave the Namespace value set to root\CIMv2. In the Query text box, type the following:
    select * from Win32_OperatingSystem WHERE Version like "6.1%"
     
    5. Click OK to save the query to the filter. Click Save to save your completed filter.
    6. Choose and apply the new WMI Filter item at the bottom of the right hand pane.
    After completing the process, run the command gpupdate /force on both the server and clients to refresh the policy. Then you can reboot the server and clients to make the GPO take effect immediately or wait some time until it affects.

    Best Regards,

    Alvin Wang


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Tuesday, August 30, 2016 12:55 PM
    Moderator

All replies

  • Hi,

    Here is how to create a WMI filter:

    https://technet.microsoft.com/en-us/library/cc754488(v=ws.10).aspx

    Go to your GPMC to create the WMI filter.

    For Windows 7 use

    select * from Win32_OperatingSystem where Version like "6.1%"and ProductType = "1"

    Then go to your policy to apply the filter.

    FrenchITGuy.com

    • Marked as answer by bill gao Wednesday, August 31, 2016 12:33 AM
    Tuesday, August 30, 2016 9:37 AM
  • Hi,

    Thanks for your post.

    Please refer to the steps below:
    1. Open GPMC on the domain controller.
    2. In the navigation pane, expand Forest: YourForestName, expand Domains, expand YourDomainName, and then click WMI Filters.

    3. Right-click on the WMI Filter item and choose New. In the Name text box, type the name of the WMI filter, such as Windows 7. In the Description text box, type a description for the WMI filter, such as Windows 7.
    4. Leave the Namespace value set to root\CIMv2. In the Query text box, type the following:
    select * from Win32_OperatingSystem WHERE Version like "6.1%"
     
    5. Click OK to save the query to the filter. Click Save to save your completed filter.
    6. Choose and apply the new WMI Filter item at the bottom of the right hand pane.
    After completing the process, run the command gpupdate /force on both the server and clients to refresh the policy. Then you can reboot the server and clients to make the GPO take effect immediately or wait some time until it affects.

    Best Regards,

    Alvin Wang


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Tuesday, August 30, 2016 12:55 PM
    Moderator
  • thanks for the detailed steps, it worked properly im my environment
    Wednesday, August 31, 2016 12:33 AM
  • Hi,

    I am glad to hear that the information is helpful to you. If there is anything else we can do for you, please feel free to post in the forum.

    Best Regards,

    Alvin Wang


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, August 31, 2016 2:16 AM
    Moderator