none
WMI filter in GPO for domain Computer

    Question

  • Hi All,

    I want to filter description field of Domain Computer for applying to GPO. 

    Description value is: X240 Lenovo

    I'm trying to use SELECT * FROM Win32_ComputerSystem WHERE description LIKE "%X240%" 

    but it not affect.

    Any wrong in my query command? Please help me, I'm stressing with it. 

    Thank all.


    Tuesday, March 21, 2017 4:04 AM

Answers

  • you want strange things:)

    wmi is for retrieving local information from pc, such as OS version or processor or manufacurer etc.

    you can do wmi query to AD, but it is not good idea.

     If you want to restrict applying gpo for pc, basing on AD attributes, you can add your PCs to AD group and apply GPO to this AD group

    • Marked as answer by Hung Ho Tuesday, March 21, 2017 9:30 AM
    Tuesday, March 21, 2017 7:43 AM

All replies

  • are you about Description field in system properties of local computer (then you can try SELECT * FROM Win32_OperatingSystem) or about description of AD object?

    Also you can try

    SELECT * FROM Win32_ComputerSystem WHERE Manufacturer LIKE “%Lenovo%”

    or

    SELECT * FROM Win32_ComputerSystemProduct WHERE Version LIKE "%X240%"

    Tuesday, March 21, 2017 6:50 AM
  • are you about Description field in system properties of local computer (then you can try SELECT * FROM Win32_OperatingSystem) or about description of AD object?

    => about description of AD object

    I'm working in AD environment. Those line query above not work for me. 


    Tuesday, March 21, 2017 7:01 AM
  • you want strange things:)

    wmi is for retrieving local information from pc, such as OS version or processor or manufacurer etc.

    you can do wmi query to AD, but it is not good idea.

     If you want to restrict applying gpo for pc, basing on AD attributes, you can add your PCs to AD group and apply GPO to this AD group

    • Marked as answer by Hung Ho Tuesday, March 21, 2017 9:30 AM
    Tuesday, March 21, 2017 7:43 AM
  • > I want to filter description field of Domain Computer for applying to GPO.
     
    You want to filter based on the description of the AD object? Impossible... Unless you use Item Level Targeting and Environment variables.
     
    Tuesday, March 21, 2017 9:21 AM