• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4787
  • Last Modified:

WMI Determine Workstation or Laptop (Portable PC)

I am creating WMI Filters in AD Windows 2008 Environment.  I would like some policies to be applied to Workstations and some applied to Laptops only.  I have looked at the chassies and see numourous for each.  Is there a way to do this in a better manner with WMI, can you give me the WMI code to do this?

0
m698322h
Asked:
m698322h
1 Solution
 
tigermattCommented:

If I recall correctly, the problem I found when attempting this is that the chassis information (the perfect way to determine the type of machine) was in a WMI array, which a GPO WMI filter can't process.

What I wound up doing was using the presence of a Battery and assuming that meant the machine was a laptop. Of course, this is fraught with issues and there are cases such a policy could apply to PCs (if any PC has a UPS attached for example). However it was the best I could do out of a bad job.

The WMI filter I use for my Workstation is a laptop filter is:
SELECT * FROM Win32_Battery WHERE Description LIKE '%'

Open in new window


When setting policies for laptops and workstations, I set the policy I want to apply to workstations in a workstation policy, then link a laptop policy with higher precendence which uses that WMI filter, and set the setting which is supposed to apply to laptops.

I only set a couple of things to do with roaming profiles in this manner, and for the most part, it seems to work fine. I haven't heard of any significant issues, but don't rely on it for enforcing security or securing portable machines for compliance reasons etc because it isn't foolproof and there are cases where it may not apply.

-Matt
0
 
Joseph MoodyBlogger and wearer of all hats.Commented:
Select * from Win32_Battery where BatteryStatus <> 0
0
 
Mike KlineCommented:
Hey Matt...running into you a lot today :)

Ok my WMI answer is a direct "steal" from Darren Mar-Elia's GP list from 2008.  This is one of the posts I have starred.  He had a contest based on this request and someone came up with a slick query

*****From Joel C on Darren's list*****

Select * from Win32_PhysicalMemory where FormFactor != 12

Returns True on computers that do not have SoDimm form factor memory and False on computers with SoDimm form factor memory.  The assumption is that all laptops will have this style memory and desktops will not.  Works in my environment, but it's a pretty small environment.

************************************

Group Policy Preferences have good item level targeting options that may help   http://technet.microsoft.com/en-us/library/cc733022.aspx

- battery present
-  portable computer targeting

Thanks

Mike
0
 
Joseph MoodyBlogger and wearer of all hats.Commented:
Maybe one day, I'll be a genius too...
0
 
queens2007Commented:
What about machines that do not use SODIMM such as Dell Lattitude laptops.
They will use a formfactor 8 chip ;)
However, the devicelocator will always be DIMM_A, or B or C or D depending on how many chips are in the lattitude.

So for an even more accurate targetting of non-laptop devices including those pesky Dells, I use:
Select * from Win32_PhysicalMemory where FormFactor != 12  and devicelocator != "DIMM_A" and devicelocator != "DIMM_B"
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now