GPO WMI Filter to check if a machine is a server 2000 or 2003 and it is NOT a domain controler


Someone great with WMI filters could comment on this.  I want a "select * from" command for a WMI filter in AD GPO.

I want the filter to work in the "root\CIMV2" namespace of course. I want to check if the following is true;

A windows Server, 2000 or 2003 and NOT a domain Controler.

Thanks in advance.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michael PfisterCommented:
Instead of creating an elaborate WMI filter, why not put the DCs in OU "DCs" and the member servers in a different OU "MemberServer" and link the GPO(s) accordingly?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Michael PfisterCommented:
BTW, WMI filters are not supported on Windows 2000
PeterSingerAuthor Commented:
The solution is to create a WMI filter with the following statement;
For Server 2003 and above only
Select *  from Win32_ComputerSystem where DomainRole = 3
As commented above the WMI filter will not work on a 2000 server at all.
I created a batch file and ran it in the logon section and made this policy only run at logon.
The script did a check fior the operating system then ignored windows 2000 domain controlers.
for /f "tokens=* delims=" %%a in ('ver') do @set osversion=%%a
PeterSingerAuthor Commented:
I placed the solution on-line to the issue but I would not have reached the solution if the comment was not made about Windows 2000 abilities re WMI filters.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Server OS

From novice to tech pro — start learning today.