Solved

WMI Determine Workstation or Laptop (Portable PC)

Posted on 2011-02-25
5
4,517 Views
Last Modified: 2012-06-27
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
Comment
Question by:m698322h
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 58

Expert Comment

by:tigermatt
ID: 34981356

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
 
LVL 22

Expert Comment

by:Joseph Moody
ID: 34981669
Select * from Win32_Battery where BatteryStatus <> 0
0
 
LVL 57

Accepted Solution

by:
Mike Kline earned 500 total points
ID: 34981685
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
 
LVL 22

Expert Comment

by:Joseph Moody
ID: 34981696
Maybe one day, I'll be a genius too...
0
 

Expert Comment

by:queens2007
ID: 37827979
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

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
Here's a look at newsworthy articles and community happenings during the last month.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
Suggested Courses

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question