Petri IT Knowledgebase Forums
 

Petri.co.il forums Home Forums Start Page Forums Frequently Asked Questions FAQ Member List Members List
Go Back   Petri IT Knowledgebase Forums > Microsoft Networking Services > GPO
Petri.co.il is happy to award auglan the title of Most Valuable Member !!!
Register Calendar Calendar Search Petri IT Knowledgebase Forums Search Todays Posts Today's Posts Mark Forums Read

Notices

GPO WMI filtering not working

GPO WMI filtering not working

this thread has 2 replies and has been viewed 1582 times

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 9th April 2012, 15:01
Deland01 Deland01 is offline
Member
Staying around
 
 Join Date: Jan 2007
  6 month star 12 month star
 Posts: 273
 Reputation: Deland01 will become famous soon enough (66)
Default GPO WMI filtering not working

I have a GPO which I want to only apply to servers so I set up a WMI filter with the following 3 scripts:


select * from Win32_OperatingSystem WHERE Version LIKE "5.2%" AND ( ProductType = "2" or ProductType = "3" )


select * from Win32_OperatingSystem WHERE Version LIKE "6.0%" AND ( ProductType = "2" or ProductType = "3" )


select * from Win32_OperatingSystem WHERE Version LIKE "6.1%" AND ( ProductType = "2" or ProductType = "3" )

The above scripts should apply to Server 2003, Server 2008 & Server 2008 R2 domain controllers & member servers. However when I test the GPO it doesn’t appear to be working.

If I just have x1 of the scripts in the filter they all work fine independently.

Does anyone know why this is not working with all the scripts on the filter?
  #2  
Old 12th April 2012, 22:00
Rems's Avatar
Rems Rems is offline
Moderator
 
 Join Date: Mar 2005
  6 month star 12 month star
 Location: NL
 Posts: 2,282
 Reputation: Rems is a splendid one to beholdRems is a splendid one to beholdRems is a splendid one to beholdRems is a splendid one to beholdRems is a splendid one to beholdRems is a splendid one to beholdRems is a splendid one to beholdRems is a splendid one to behold (903)
Default Re: GPO WMI filtering not working

Quote:
Originally Posted by Deland01 View Post
I have a GPO which I want to only apply to servers so I set up a WMI filter with the following 3 scripts:


Code:
select * from Win32_OperatingSystem WHERE Version LIKE "5.2%" AND ( ProductType = "2" or ProductType = "3" )

select * from Win32_OperatingSystem WHERE Version LIKE "6.0%" AND ( ProductType = "2" or ProductType = "3" )

select * from Win32_OperatingSystem WHERE Version LIKE "6.1%" AND ( ProductType = "2" or ProductType = "3" )
The above scripts should apply to Server 2003, Server 2008 & Server 2008 R2 domain controllers & member servers. However when I test the GPO it doesn’t appear to be working.

If I just have x1 of the scripts in the filter they all work fine independently.
Does anyone know why this is not working with all the scripts on the filter?

No single machine can pass all three conditions and therefore the policy will never be applied.

You should create a WMI-filter containing a single "WHERE" clause for this WMI class and use the OR operator, instead of using the three "WHERE" clauses.
sample;
Code:
select * from Win32_OperatingSystem WHERE (Version LIKE "5.2%" OR Version LIKE "6.0%" OR Version LIKE "6.1%") AND (ProductType = 2 OR ProductType = 3)
/Rems
__________________

This posting is provided "AS IS" with no warranties, and confers no rights.

__________________

** Remember to give credit where credit's due **
and leave Reputation Points for meaningful posts

Last edited by Rems; 12th April 2012 at 22:02..
  #3  
Old 14th April 2012, 17:04
Deland01 Deland01 is offline
Member
Staying around
 
 Join Date: Jan 2007
  6 month star 12 month star
 Posts: 273
 Reputation: Deland01 will become famous soon enough (66)
Default Re: GPO WMI filtering not working

Rems - Thanks for this I had a feeling it was something simple in the script.

Have some points

Last edited by Deland01; 14th April 2012 at 17:04.. Reason: typo change
Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cisco 857W NOT WORKING - DHCP NOT WORKING? - Please help hotwiredc Cisco Routers & Switches How-to 10 9th November 2009 18:48
Web Filtering Which way to go???? Bart586 General Hardware 10 28th May 2009 13:26
GPO security filtering not working technician Active Directory 1 16th September 2008 09:50
PTR filtering scurlaruntings Exchange 2000 / 2003 13 11th April 2008 16:05
Message Filtering is not Working... arunrajdls Exchange 2000 / 2003 0 1st April 2005 10:31


All times are GMT +3. The time now is 08:38.

Steel Blue 3.5.4 vBulletin Style ©2006 vBEnhanced
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
 

Valid XHTML 1.0!   Valid CSS!

Copyright 2005 Daniel Petri