RSS

WMI Filter for laptops

29 Sep

For filtering laptops in a WMI query there are several different approaches to find out if a system is a laptop or not. A suggested way found on the internet is following WMI query

SELECT * FROM Win32_Battery WHERE (BatteryStatus <> 0)

This works, but if you remove the battery from your laptop and keep the lLaptop on the power chord only this will not work. Then the laptop seems to be a desktop machine. A better approach is to use the following WMI-query:

SELECT * FROM Win32_ComputerSystem WHERE PCSystemType = "2";
Advertisements
 
Leave a comment

Posted by on September 29, 2014 in Windows Server

 

Tags: ,

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: