Location: List Archives

List Archives

This forum is an archive of all posts to our mailing list over the past few years.  The forum is set read only therefore to contribute you will need to join our list community.  See more info about this here.

 

When subscribed to the list you should use your standard email client to send your posts to ActiveDir@mail.activedir.org.

List Archives

Subject: [ActiveDir] WMI filter for XP laptops
Prev Next
You are not authorized to post a reply.

AuthorMessages
anwark99User is Offline

Posts:4

10/30/2011 5:00 PM  
We have a Windows 2008 R2 domain with both Windows XP and Windows 7 laptops and desktops.
They are not in separate OUs.

I need to apply a GPO to XP laptops only.
Can someone help me with a WMI filter, so it only applies to Laptops with XP OS.
I cannot use GPO client preferences; it is a startup script, and the GPO contains a custom template.

I am already using these WMI filters; if they can be combined.

Laptops:
“Select * from Win32_Battery where BatteryStatus <> 0”

XP OS:
"Select * from Win32_OperatingSystem Where (Caption Like "%Windows XP%")"

Thanks,

Khurshid Anwar
____________
NuAxis, LLC
8614 Westwood Center Drive, Suite 450 | Vienna, VA 22182
anwark@nuaxis.com<mailto:khurshid.anwar@nuaxis.com> | www.nuaxis.com<http://www.nuaxis.com/>
voice: 703.481.7400 x 867 | fax: 703.935.5523


darrenUser is Offline

Posts:393

10/30/2011 5:00 PM  
You can have a WMI Filter that contains multiple queries. They are AND'd and must both evaluate to true for the filter to pass. Just add the two queries when you're creating the filter.

Darren

Darren Mar-Elia
CTO & Founder - www.sdmsoftware.com<http://www.sdmsoftware.com>
"The Group Policy Experts"
Group Policy Resource Site: www.gpoguy.com<http://www.gpoguy.com>





From: activedir-owner@mail.activedir.org [mailto:activedir-owner@mail.activedir.org] On Behalf Of Khurshid Anwar
Sent: Friday, July 29, 2011 7:59 AM
To: activedir@mail.activedir.org
Subject: [ActiveDir] WMI filter for XP laptops

We have a Windows 2008 R2 domain with both Windows XP and Windows 7 laptops and desktops.
They are not in separate OUs.

I need to apply a GPO to XP laptops only.
Can someone help me with a WMI filter, so it only applies to Laptops with XP OS.
I cannot use GPO client preferences; it is a startup script, and the GPO contains a custom template.

I am already using these WMI filters; if they can be combined.

Laptops:
"Select * from Win32_Battery where BatteryStatus <> 0"

XP OS:
"Select * from Win32_OperatingSystem Where (Caption Like "%Windows XP%")"

Thanks,

Khurshid Anwar
____________
NuAxis, LLC
8614 Westwood Center Drive, Suite 450 | Vienna, VA 22182
anwark@nuaxis.com<mailto:khurshid.anwar@nuaxis.com> | www.nuaxis.com<http://www.nuaxis.com/>
voice: 703.481.7400 x 867 | fax: 703.935.5523

hboogzUser is Offline

Posts:72

10/30/2011 5:00 PM  
Similarly, is it true to assume that the query for a Windows 7 machine would
be:

"Select * from Win32_OperatingSystem Where (Caption Like "%Windows 7%")"

I would like to assign GPO's based on OS now that we are adding more Win7
boxes onto the network.

On Fri, Jul 29, 2011 at 11:26 AM, Darren Mar-Elia <darren@sdmsoftware.com>wrote:

> You can have a WMI Filter that contains multiple queries. They are AND’d
> and must both evaluate to true for the filter to pass. Just add the two
> queries when you’re creating the filter.****
>
> ** **
>
> Darren****
>
> ** **
>
> Darren Mar-Elia****
>
> CTO & Founder – www.sdmsoftware.com****
>
> “The Group Policy Experts”****
>
> Group Policy Resource Site: www.gpoguy.com****
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> *From:* activedir-owner@mail.activedir.org [mailto:
> activedir-owner@mail.activedir.org] *On Behalf Of *Khurshid Anwar
> *Sent:* Friday, July 29, 2011 7:59 AM
> *To:* activedir@mail.activedir.org
> *Subject:* [ActiveDir] WMI filter for XP laptops****
>
> ** **
>
> We have a Windows 2008 R2 domain with both Windows XP and Windows 7 laptops
> and desktops.****
>
> They are not in separate OUs.****
>
> ****
>
> I need to apply a GPO to XP laptops only.****
>
> Can someone help me with a WMI filter, so it only applies to Laptops with
> XP OS.****
>
> I cannot use GPO client preferences; it is a startup script, and the GPO
> contains a custom template.****
>
> ****
>
> I am already using these WMI filters; if they can be combined.****
>
> ****
>
> *Laptops: *****
>
> “Select * from Win32_Battery where BatteryStatus <> 0”****
>
> ****
>
> *XP OS:*****
>
> "Select * from Win32_OperatingSystem Where (Caption Like "%Windows
> XP%")"****
>
> ****
>
> Thanks,****
>
> ****
>
> *Khurshid Anwar*****
>
> *____________*****
>
> *Nu**A**xis, LLC*****
>
> 8614 Westwood Center Drive, Suite 450 | Vienna, VA 22182****
>
> *anwark@nuaxis.com <khurshid.anwar@nuaxis.com>* | www.nuaxis.com****
>
> voice: 703.481.7400 x 867 | fax: 703.935.5523****
>
> ****
>

robertsingersUser is Offline

Posts:579

10/30/2011 5:04 PM  
Another query for laptops is

Select * from Win32_SystemEnclosure where objChassis.ChassisTypes = 9


I use this to get Windows XP SP2+ machines (you could just look for the version)

Select * from WIN32_OperatingSystem where ServicePackMajorVersion>=2 and Version='5.1.2600'

And to get O/Ses after Windows XP i.e. Vista and Windows 7

Select * from WIN32_OperatingSystem where Version>6.0 and ProductType=1


From: activedir-owner@mail.activedir.org [mailto:activedir-owner@mail.activedir.org] On Behalf Of Khurshid Anwar
Sent: Saturday, 30 July 2011 2:59 a.m.
To: activedir@mail.activedir.org
Subject: [ActiveDir] WMI filter for XP laptops

We have a Windows 2008 R2 domain with both Windows XP and Windows 7 laptops and desktops.
They are not in separate OUs.

I need to apply a GPO to XP laptops only.
Can someone help me with a WMI filter, so it only applies to Laptops with XP OS.
I cannot use GPO client preferences; it is a startup script, and the GPO contains a custom template.

I am already using these WMI filters; if they can be combined.

Laptops:
"Select * from Win32_Battery where BatteryStatus <> 0"

XP OS:
"Select * from Win32_OperatingSystem Where (Caption Like "%Windows XP%")"

Thanks,

Khurshid Anwar
____________
NuAxis, LLC
8614 Westwood Center Drive, Suite 450 | Vienna, VA 22182
anwark@nuaxis.com<mailto:khurshid.anwar@nuaxis.com> | www.nuaxis.com<http://www.nuaxis.com/>
voice: 703.481.7400 x 867 | fax: 703.935.5523




This message has been scanned for viruses and is believed to be clean.

#####################################################################################
This message has been scanned for viruses and is believed to be clean.
#####################################################################################

----------------------------------------------------------------------------------------
Please Note:
The information contained in this email message and any attached files may be confidential and subject to privilege. If you are not the intended recipient of this message, privilege and confidentiality is not waived or lost, and you are not entitled to use, disclose or copy it in any way. Opinions expressed in this message are not necessarily those of the Department of Building and Housing. The Department does not accept any liability for any technical opinions offered. While we use standard virus protection software, we do not accept responsibility for viruses or anything similar in this email or its attachments, nor do we accept responsibility for changes made to this email or to its attachments after it leaves our system. If you have received this email in error, please notify us immediately by reply email and delete the original and any attachment(s). Thank you.
----------------------------------------------------------------------------------------

gabriel/tfiUser is Offline

Posts:427

10/30/2011 5:41 PM  
If I recall well ChassisType property of the Win32_SystemEnclosure class is
a uint16 array data type that is not supported in WQL (WMI Query Language),
so I don't believe it can be used for a GPO WMI filter (pretty sure for XP,
no idea for Win7). - Gabriele.



From: activedir-owner@mail.activedir.org
[mailto:activedir-owner@mail.activedir.org] On Behalf Of Robert Singers
Sent: Monday, August 01, 2011 12:18 AM
To: activedir@mail.activedir.org
Subject: RE: [ActiveDir] WMI filter for XP laptops



Another query for laptops is



Select * from Win32_SystemEnclosure where objChassis.ChassisTypes = 9





I use this to get Windows XP SP2+ machines (you could just look for the
version)



Select * from WIN32_OperatingSystem where ServicePackMajorVersion>=2 and
Version='5.1.2600'



And to get O/Ses after Windows XP i.e. Vista and Windows 7



Select * from WIN32_OperatingSystem where Version>6.0 and ProductType=1





From: activedir-owner@mail.activedir.org
[mailto:activedir-owner@mail.activedir.org] On Behalf Of Khurshid Anwar
Sent: Saturday, 30 July 2011 2:59 a.m.
To: activedir@mail.activedir.org
Subject: [ActiveDir] WMI filter for XP laptops



We have a Windows 2008 R2 domain with both Windows XP and Windows 7 laptops
and desktops.

They are not in separate OUs.



I need to apply a GPO to XP laptops only.

Can someone help me with a WMI filter, so it only applies to Laptops with XP
OS.

I cannot use GPO client preferences; it is a startup script, and the GPO
contains a custom template.



I am already using these WMI filters; if they can be combined.



Laptops:

"Select * from Win32_Battery where BatteryStatus <> 0"



XP OS:

"Select * from Win32_OperatingSystem Where (Caption Like "%Windows
XP%")"



Thanks,



Khurshid Anwar

____________

NuAxis, LLC

8614 Westwood Center Drive, Suite 450 | Vienna, VA 22182

anwark@nuaxis.com <mailto:khurshid.anwar@nuaxis.com> | www.nuaxis.com
<http://www.nuaxis.com/>

voice: 703.481.7400 x 867 | fax: 703.935.5523





This message has been scanned for viruses and is believed to be clean.



This message has been scanned for viruses and is believed to be clean.



_____

Please Note:
The information contained in this email message and any attached files may
be confidential and subject to privilege. If you are not the intended
recipient of this message, privilege and confidentiality is not waived or
lost, and you are not entitled to use, disclose or copy it in any way.
Opinions expressed in this message are not necessarily those of the
Department of Building and Housing. The Department does not accept any
liability for any technical opinions offered. While we use standard virus
protection software, we do not accept responsibility for viruses or anything
similar in this email or its attachments, nor do we accept responsibility
for changes made to this email or to its attachments after it leaves our
system. If you have received this email in error, please notify us
immediately by reply email and delete the original and any attachment(s).
Thank you.

_____





You are not authorized to post a reply.
Forums >ActiveDir Mail List Archive >List Archives > [ActiveDir] WMI filter for XP laptops



ActiveForums 3.7
Friends

Friends

VisualClickButoton
Members

Members

MembershipMembership:
Latest New UserLatest:dilips_mon
New TodayNew Today:1
New YesterdayNew Yesterday:0
User CountOverall:5292

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

Online NowOnline Now:

Ads

Copyright 2012 ActiveDir.org
Terms Of Use