WMI filter for xp and 7

We currently have many GPO's with a WMI filter for all machines that are windows xp pro, now we have some windows 7 machines and the GPO's are being filtered out. how do i change the filter to allow for xp pro "or" windows 7?
Who is Participating?
Mike KlineConnect With a Mentor Commented:
Haven't tested this out (don't want to lie) I don't have a 7 box at my lab where I am right now

 Select * from Win32_OperatingSystem where Caption = "Microsoft Windows XP Professional" OR Caption = "Microsoft Windows 7 Enterprise "

another method I thought about is

select * from Win32_OperatingSystem where Version like "6.1" OR Version like "5.1"
got that idea from http://technet.microsoft.com/en-us/library/cc754488(WS.10).aspx


KenoboyAuthor Commented:
I used the second suggestion, just had to add (and ProductType = "1" to denote a client OS. server versions are 5.% also. this is the query i used:

Select * from Win32_OperatingSystem where Version like "5.%" and ProductType = "1" OR Version like "6.%" and ProductType = "1"

Thank you.
Mike KlineCommented:
Nice work!!
All Courses

From novice to tech pro — start learning today.