Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WMI WQL Scripting help 1

Status
Not open for further replies.

baronne

Technical User
May 31, 2003
166
Hi (WMI scripting newbie alert!),
I'm trying to do some filtering in GPO's in Windows 2003. I'd like to create a filter for "All Computers except ones beginning with 'BOARD'"
So the WQL query I have is SELECT * FROM Win32_ComputerSystem WHERE Name NOT LIKE 'BOARD%' - but the system doesn't seem to like the 'NOT' - any ideas?

Also I'd like to test out my WMI filters by running a similar query on the active directory to query machine names. How would I do that in VBscript?

cheers
Baronne

:: baronne
------------------
"lekker, shot bru
 
You may try this:
SELECT * FROM Win32_ComputerSystem WHERE NOT Name LIKE 'BOARD%'

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
you're a machine!
cheers

:: baronne
------------------
"lekker, shot bru
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top