WMI Filter for Computer in Group

C S 1 Reputation point
2021-04-07T17:12:06.187+00:00

Hi everyone,

i´m trying to apply a GPO to some Workstations in an OU. The GPO should install a small program.
This is what i did:

  1. Create OU "WS" with Workstations
  2. Create Group "Group_Program"
  3. Assigned some Workstations to "Group_Program"
  4. Create GPO "Install_Program"
  5. Create WMI Filter "WMI_Program"
  6. Apply GPO to OU "WS" with worktsations

The WMI Query is like
SELECT * FROM Win32_GroupUser WHERE GroupComponent="Win32_Group.Domain='DOMAIN',Name='Group_Program'"

I know that i can do this with security filtering, but i want to understand what i´m doing wrong.

Thanks

C

Windows for business Windows Client for IT Pros User experience Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2021-04-08T07:38:27.687+00:00

    Hi,
    I tried to use the wmi to filter the group membership in my lab without success.
    Not sure if the WMI for the group membership can't be used on the GPO .
    Similar case for your reference:
    https://social.technet.microsoft.com/Forums/en-US/e3c7a206-a219-4e03-b927-932f0d21c04c/control-user-policy-per-computer?forum=winserverGP
    I would do more research about it ,if there are any progress, i would update here!
    So for now ,as you said a easier way to filter the group membership it is though security filter.

    Best Regards,

    0 comments No comments

  2. C S 1 Reputation point
    2021-04-10T16:12:56.377+00:00

    Hi FanFan-MSFT,

    thanks for your information. I´m looking forward for a solution with wmi filtering. When i try the wmi filter in powershell i get back all computers. As far as i understand that counts as an "true" for the filter.

    PowerShell:
    get-wmiobject -query "select * from win32_groupuser where GroupComponent=""Win32_Group.Domain='DOMAIN',Name='Group_Program'"""

    Excecution on Domain Controller and on my local computer (i will try other workstations as well)

    Best regards
    C


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.