question

CS-9488 avatar image
0 Votes"
CS-9488 asked FanFan-MSFT commented

WMI Filter for Computer in Group

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-group-policy
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

FanFan-MSFT avatar image
0 Votes"
FanFan-MSFT answered

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,

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

CS-9488 avatar image
0 Votes"
CS-9488 answered FanFan-MSFT commented

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

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

If the command works well, just not working on the GPO, we can consider that the wmi filter not working on the group membership.

Best Regards,

0 Votes 0 ·