[gptalk] Re: WMI Filter - problem with properties "array of string"

  • From: Thorbjörn Sjövold <thorbjorn.sjovold@xxxxxxxxxxxxxxx>
  • To: <gptalk@xxxxxxxxxxxxx>
  • Date: Mon, 23 Apr 2007 21:46:40 +0200

Sylvain,

Unfortunately you cannot query on array types with only WQL, and it's "by 
design" and you have to use programming logic to access the arrays, which of 
course makes them useless as WMI filters, but I've seen a workaround that I've 
tweaked somewhat, although I have not tried myself in a live environment, that 
perhaps can help you out here. For example if you want to get the subnet 
10.1.1.255 you could use the following:

SELECT * FROM Win32_IP4RouteTable WHERE Name LIKE "10.1.1.%" AND Mask = 
"255.255.255.255"

The Name property contains the destination, I guess you can use the Destination 
property too, and since all computers have their own IP as a destination in the 
routing table, this will hit them, using the Mask property will reduce the risk 
of hitting a static defined route. Again I have not used it myself, we even 
added custom targeting to our own products just to get around problems like 
this, but I suppose it could work if you are not to broad in your targeting and 
do not have static routes defined on your computers since that could 
potentially mess this up... Also there could be other network configs that 
could prevent this from working, but my general guess is that it works fine in 
most situations.

If it works fine, please ping back here and tell us about it and we'll all 
learn something new :) 

HTH,

Thorbjörn Sjövold
Special Operations Software
www.specopssoft.com
thorbjorn.sjovold a t specopssoft.com
 
Download our free tool for remote Gpupdate with graphical reporting,
http://www.specopssoft.com/products/specopsgpupdate/





-----Original Message-----
From: gptalk-bounce@xxxxxxxxxxxxx [mailto:gptalk-bounce@xxxxxxxxxxxxx] On 
Behalf Of Sylvain
Sent: den 23 april 2007 18:44
To: gptalk@xxxxxxxxxxxxx
Subject: [gptalk] WMI Filter - problem with properties "array of string"

Hi All,

If have trouble creating a WMI filter based on the 
"Win32_NetworkAdapterConfiguration" class

If I check a property with only one value (for example de DNShostname) 
it works

But if I try to retrieve the client IP or an other property set as 
"array of string" I can't set the WQL request.

Any idea ?
I only need to have a WMI filter base on : ClientIP or ClientSubnet or 
ClientDefaultGateway

Thanks,
Sylvain
***********************
You can unsubscribe from gptalk by sending email to 
gptalk-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field OR by 
logging into the freelists.org Web interface. Archives for the list are 
available at //www.freelists.org/archives/gptalk/
************************
***********************
You can unsubscribe from gptalk by sending email to 
gptalk-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field OR by 
logging into the freelists.org Web interface. Archives for the list are 
available at //www.freelists.org/archives/gptalk/
************************

Other related posts: