[gptalk] Re: WMI Question

  • From: "Nelson, Jamie R Contr 72 CS/SCBAF" <Jamie.Nelson.ctr@xxxxxxxxxxxxx>
  • To: <gptalk@xxxxxxxxxxxxx>
  • Date: Thu, 26 Jul 2007 15:58:18 -0500

No there shouldn't be a problem with using a "generic" filter like that.
Don't know about everyone else but I do that all the time.  If you want
to target a specific build or service pack just make a separate, more
detailed filter that looks at the Build or Service Pack (CSDVersion)
properties.

 

Regards,

Jamie Nelson

 

From: gptalk-bounce@xxxxxxxxxxxxx [mailto:gptalk-bounce@xxxxxxxxxxxxx]
On Behalf Of Mills, Mark
Sent: Thursday, July 26, 2007 2:31 PM
To: gptalk@xxxxxxxxxxxxx
Subject: [gptalk] Re: WMI Question

 

Is there anything "wrong" or "un professional" with using the "LIKE"
command when you are filtering with WMI for just the general OS type.
Instead of having my filters look for the exact string I use the "like"
argument so it covers all versions and builds of XP or Vista.

 

I guess the caveat would be if you wanted to apply ( or not apply)
something to a specific build or service pack of an OS.

 

Examples:

 

WMI Filter looks for "Microsoft Windows XP" anywhere in the caption

SELECT * from Win32_OperatingSystem WHERE Caption LIKE "Microsoft
Windows XP%" 

 

WMI Filter looks "Vista" anywhere in the caption

SELECT * from Win32_OperatingSystem WHERE Caption LIKE "%Vista%"

Instead of looking for Vista's new caption "Microsoftr Windows VistaT
Enterprise"

 

For those looking for examples:
http://grouppolicy.editme.com/WMIFilters 

 

Mark Mills 

Other related posts: