[gptalk] Select statement calling Win32_Group in a WMI FIlter

  • From: jfvanmeter@xxxxxxxxxxx
  • To: gptalk@xxxxxxxxxxxxx (gpotalk)
  • Date: Thu, 22 May 2008 17:14:03 +0000

Hello everyone, I'm trying to write a wmi filter that will apply group policy 
based on group membership.  Lets say I have computer accounts are all XP 
workstations  in two groups Group1 and Group2

The following works

select * from Win32_Group Where Domain = "Domainname" and Name = "Group1" any 
computers that are a member of Group1 will recieve the group policy that I have 
it linked to, any computer not a member of Group1 the policy is filtered. I 
need the filter to use both Group1 or Group2.

I've tried to the following
1 select * from Win32_Group Where Domain = "Domainname" and Name = "Group1" or 
Name = "Group2"

2 select * from Win32_Group Where Domain = "Domainname" and Name = "Group1"  or 
Domain = "Domainname" and Name = "Group2"

3 I've tried to seperate filters together
select * from Win32_Group Where Domain = "Domainname" and Name = "Group1"
select * from Win32_Group Where Domain = "Domainname" and Name = "Group2"

With any of the above 3 GPResults shows the policy being filter when I try to 
add the second group. If someone could point me in the right direction that 
would be great.

Take Care and Have Fun --John
***********************
You can unsubscribe from gptalk by sending email to 
gptalk-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field OR by 
logging into the freelists.org Web interface. Archives for the list are 
available at //www.freelists.org/archives/gptalk/
************************

Other related posts: