Location: Mail List

Ads

Skyscraper

The GPTalk Mailing List

The GPTALK mailing list is where you can send and receive email related to Windows Group Policy. You must subscribe to the list to send and receive mail from the list. The purpose of the list is to provide a forum for asking and answering technical questions related to Group Policy. Any question is fair game as long as it is related to Windows Group Policy.  The Archives for this list can be found on this page.

 

List Posts

Subject: [gptalk] GPP Item-Level Targeting and Win32_SystemEnclosure.ChassisTypes
Prev Next
You are not authorized to post a reply.

AuthorMessages
gabro.netUser is Offline

Posts:15

01/31/2012 3:42 PM  
I know the “classic” GPO WMI filtering did not support Array type, so it was not possible to use the Win32_SystemEnclosure.ChassisTypes to determine if a computer was a desktop or a laptop.



Recently I tried to use a similar approach with GPP Item-Level Targeting WMI but surprisingly it does not work either. L



I strated creating a write-registry GPP with the following targeting:

- He portable computer docking state is docked, undocked, unknown

- OR a battery is present

- OR a PCMCIA is present

and the registry key got written to my laptop (Win 7).



I started adding the following and had no luck:

OR SELECT ChassisTypes from Win32_SystemEnclosure WHERE (ChassisTypes="8" OR ChassisTypes="9" OR ChassisTypes="10" OR ChassisTypes="11" OR ChassisTypes="14" OR ChassisTypes="18")



I tried a simpler query and no luck either:

OR SELECT ChassisTypes from Win32_SystemEnclosure WHERE ChassisTypes="8"



On the other hand I tried a different query that is not an Array type and works:

SELECT PCSystemType FROM Win32_ComputerSystem WHERE PCSystemType="2"



So my question… does really GGP *NOT* support WMI Query for Array types?



Thanks – Gabriele.


jeremysaunders1User is Offline

Posts:18

02/02/2012 1:17 AM  
No, it doesn’t work. You can track why through the following posts:

http://www.petri.co.il/forums/showthread.php?t=21443

http://www.petri.co.il/forums/showthread.php?p=81280#post81280



Have a read of this article. http://www.heidelbergit.dk/2008/02/wmi-filter-contest-are-you-knight-in.html



I use this and it seems to work well for the most part:



Laptops: Select * from Win32_PhysicalMemory where FormFactor = 12

Desktops: Select * from Win32_PhysicalMemory where FormFactor != 12



But there is no perfect solution that will suite everyone’s needs, and the above query is not 100% bullet proof.



In my large deployments, I stamp the registry with info, create a MOF file and use MOFCOMP.exe to register it. I blogged about it here: http://www.jhouseconsulting.com/2009/05/10/using-a-group-policy-wmi-filter-to-test-for-a-registry-value-290



What you could do is run a build/startup script that populates a registry key with the output of a Win32_SystemEnclosure.ChassisTypes query and then use my method to read it. It’s a bit convoluted, but will provide the solution you’re looking for. In fact, this has just given me some ideas J



Cheers,

Jeremy.



From: gptalk-owner@lists.gpoguy.com [mailto:gptalk-owner@lists.gpoguy.com] On Behalf Of Darren Mar-Elia
Sent: Thursday, 2 February 2012 5:09 AM
To: gptalk@lists.gpoguy.com
Subject: RE: [gptalk] GPP Item-Level Targeting and Win32_SystemEnclosure.ChassisTypes



Gabriele-

Based on the silence, I’m going to assume no one knows the definitive answer to this. J. I will see if I can get an answer from the GP product team or will try to test this myself if I can.



Darren



From: gptalk-owner@lists.gpoguy.com [mailto:gptalk-owner@lists.gpoguy.com] On Behalf Of Gabriele Scolaro
Sent: Tuesday, January 31, 2012 6:50 AM
To: gptalk@lists.gpoguy.com
Subject: [gptalk] GPP Item-Level Targeting and Win32_SystemEnclosure.ChassisTypes



I know the “classic” GPO WMI filtering did not support Array type, so it was not possible to use the Win32_SystemEnclosure.ChassisTypes to determine if a computer was a desktop or a laptop.



Recently I tried to use a similar approach with GPP Item-Level Targeting WMI but surprisingly it does not work either. L



I strated creating a write-registry GPP with the following targeting:

- He portable computer docking state is docked, undocked, unknown

- OR a battery is present

- OR a PCMCIA is present

and the registry key got written to my laptop (Win 7).



I started adding the following and had no luck:

OR SELECT ChassisTypes from Win32_SystemEnclosure WHERE (ChassisTypes="8" OR ChassisTypes="9" OR ChassisTypes="10" OR ChassisTypes="11" OR ChassisTypes="14" OR ChassisTypes="18")



I tried a simpler query and no luck either:

OR SELECT ChassisTypes from Win32_SystemEnclosure WHERE ChassisTypes="8"



On the other hand I tried a different query that is not an Array type and works:

SELECT PCSystemType FROM Win32_ComputerSystem WHERE PCSystemType="2"



So my question… does really GGP *NOT* support WMI Query for Array types?



Thanks – Gabriele.


You are not authorized to post a reply.
Forums >GPTalk >GPTalk Mailing List > [gptalk] GPP Item-Level Targeting and Win32_SystemEnclosure.ChassisTypes



ActiveForums 3.7

Members

MembershipMembership:
Latest New UserLatest:carmicklec
New TodayNew Today:0
New YesterdayNew Yesterday:0
User CountOverall:1399

People OnlinePeople Online:
VisitorsVisitors:0
MembersMembers:0
TotalTotal:0

Online NowOnline Now:

Ads

Banner Inv
Copyright 2009 by GPOGUY.COM
Terms Of Use