Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WMI Filter Using Win32_SystemEnclosure ChassisTypes Multivalue Ele

910 views
Skip to first unread message

Charles

unread,
Apr 18, 2009, 10:47:01 AM4/18/09
to
Hi All:

Is it possible to create a WMI filter and query against an item that is an
array? I'm trying to create a WMI filter for a group policy that will give
me all of the laptops in an OU. ChassisTypes is the element I want but its
an array. Is it possible to do something like:

select * from Win32_SystemEnclosure where ChassisTypes = "9"

where 9 is the value for a laptop.

Thanks much,
Charles

Marcin

unread,
Apr 18, 2009, 2:17:50 PM4/18/09
to
Charles,
Not as far as I know (actually WMI filters are fairly limited - even when
compared to standard WQL). There are however workarounds you can consider -
for example, creating a computer startup script that will query
Win32_SystemEnclosure class, capture the result, and record it in a location
that can be queried via WMI (e.g. Caption property of the local instance of
Win32_SystemEnclosure class)...

hth
Marcin

"Charles" <Cha...@discussions.microsoft.com> wrote in message
news:25FCB89E-0F51-4AC8...@microsoft.com...

Anthony [MVP]

unread,
Apr 18, 2009, 4:10:34 PM4/18/09
to
I think the normal WMI for laptop is to check for a battery.
Anthony,
http://www.airdesk.co.uk

"Charles" <Cha...@discussions.microsoft.com> wrote in message
news:25FCB89E-0F51-4AC8...@microsoft.com...

Charles

unread,
Apr 19, 2009, 5:48:01 AM4/19/09
to
Thanks much! This is a great idea. Our current logon script already has an
area in the registry of all laptops in our domain that we store "global"
variables. This fits right into how we do things. I love this workaround as
it opens up the full benefits of WMI.

Thanks again!
Charles

Charles

unread,
Apr 19, 2009, 5:49:02 AM4/19/09
to
Thanks for the followup Anthony!

Ryan

unread,
Jun 4, 2009, 12:04:03 PM6/4/09
to
Battery check works well for laptops where the battery is working or present.
I had a user's laptop battery die and now the laptop is being filtered as a
desktop.

Mike Crowley

unread,
Aug 31, 2009, 2:47:02 PM8/31/09
to
Also, If you plug the USB cable from a UPS it device manager shows a battery
(even for desktops/servers)
0 new messages