Discussion:
Is there a best way/practice for targetting OS specific GP?
(too old to reply)
TimParker
2010-03-29 12:13:04 UTC
Permalink
I now have XP SP3, Vista SP1 and Windows 7 as clients on my network. I
just ran into an issue with Screensavers and how I was targetting them
that I am still attempting to "clean up."

I was a WMI Filter:

select version from win32_operatingsystem where version < "6"

For the Older XP SP3 and then the opposite for the Vista User (just
one - my Boss!). Now that I have added about 15 Windows 7 users. They
naturally would fall into what would be pulled by the "Vista" version
of this Filter (> "6").

I attempted to use "= 6.1.7600" for the Windows 7 users, but the Vista
one is still not acting properly. I also have the Vista Screensaver
only set up for my bosses User Account.

What should I be doing for targetting OS specific Policies? TIA.

Tim
ZEDA
2010-03-30 09:17:23 UTC
Permalink
The WMI filter to define a Windows Vista Computer is:

SELECT * FROM Win32_OperatingSystem WHERE Version = "6.0%" and
ProductType = "1"

Note the %, which is the wildcard character. Then 'productType' part
tells the filter to only apply the GPO to client computers. If you don't
add that part, the GPO will also be applied to a Windows 2008 server.

For Windows 7:

SELECT * FROM Win32_OperatingSystem WHERE Version = "6.1%" and
ProductType = "1"

Read more about WMI Filters on http://zeda.nl/en/?postid=20100327A
Post by TimParker
I now have XP SP3, Vista SP1 and Windows 7 as clients on my network. I
just ran into an issue with Screensavers and how I was targetting them
that I am still attempting to "clean up."
select version from win32_operatingsystem where version< "6"
For the Older XP SP3 and then the opposite for the Vista User (just
one - my Boss!). Now that I have added about 15 Windows 7 users. They
naturally would fall into what would be pulled by the "Vista" version
of this Filter (> "6").
I attempted to use "= 6.1.7600" for the Windows 7 users, but the Vista
one is still not acting properly. I also have the Vista Screensaver
only set up for my bosses User Account.
What should I be doing for targetting OS specific Policies? TIA.
Tim
--
Zeda.nl - Windows Advanced Tips & Tricks
Cary Shultz
2010-04-07 10:33:23 UTC
Permalink
Good morning, Zeda!

Hey, not trying to hijack this post (I just posted a similar question....not
sure how I missed this post...I usually look before posting a question).....

From a processing of the WMI Filter perspective would it not be 'smarter' to
use "SELECT Version, ProductType FROM Win..." instead of "SELECT * FROM
Win...."? I remember from way back when seeing data that enumerated the
size of the query when using "SELECT *..." vs. "SELECT Version,
ProductType..." and it was substantial. Well, I guess that is up for
discussion.

I just like to optimize everything possible. We have very picky users who
notice when it takes 14 seconds vs. when it takes 18 seconds....

Thanks,

Cary
SELECT * FROM Win32_OperatingSystem WHERE Version = "6.0%" and ProductType
= "1"
Note the %, which is the wildcard character. Then 'productType' part tells
the filter to only apply the GPO to client computers. If you don't add
that part, the GPO will also be applied to a Windows 2008 server.
SELECT * FROM Win32_OperatingSystem WHERE Version = "6.1%" and ProductType
= "1"
Read more about WMI Filters on http://zeda.nl/en/?postid=20100327A
Post by TimParker
I now have XP SP3, Vista SP1 and Windows 7 as clients on my network. I
just ran into an issue with Screensavers and how I was targetting them
that I am still attempting to "clean up."
select version from win32_operatingsystem where version< "6"
For the Older XP SP3 and then the opposite for the Vista User (just
one - my Boss!). Now that I have added about 15 Windows 7 users. They
naturally would fall into what would be pulled by the "Vista" version
of this Filter (> "6").
I attempted to use "= 6.1.7600" for the Windows 7 users, but the Vista
one is still not acting properly. I also have the Vista Screensaver
only set up for my bosses User Account.
What should I be doing for targetting OS specific Policies? TIA.
Tim
--
Zeda.nl - Windows Advanced Tips & Tricks
ZEDA
2010-04-07 11:51:37 UTC
Permalink
Cary,

You are right about that, narrowing it down is faster.

I used the wildcard because it's less complicated to people who are not
familiar with WMI (and therefore easier to explain).

The difference in this example is 0,09 seconds on my system, so as long
as you don't have a lot of GPO's using the filter, you wouldn't notice.

I'll add this to the posting on http://zeda.nl/en/?postid=20100327A It
sure is good to mention the difference in speed. Thanks.

ZEDA
Post by Cary Shultz
Good morning, Zeda!
Hey, not trying to hijack this post (I just posted a similar
question....not sure how I missed this post...I usually look before
posting a question).....
From a processing of the WMI Filter perspective would it not be
'smarter' to use "SELECT Version, ProductType FROM Win..." instead of
"SELECT * FROM Win...."? I remember from way back when seeing data that
enumerated the size of the query when using "SELECT *..." vs. "SELECT
Version, ProductType..." and it was substantial. Well, I guess that is
up for discussion.
I just like to optimize everything possible. We have very picky users
who notice when it takes 14 seconds vs. when it takes 18 seconds....
Thanks,
Cary
Post by ZEDA
SELECT * FROM Win32_OperatingSystem WHERE Version = "6.0%" and
ProductType = "1"
Note the %, which is the wildcard character. Then 'productType' part
tells the filter to only apply the GPO to client computers. If you
don't add that part, the GPO will also be applied to a Windows 2008
server.
SELECT * FROM Win32_OperatingSystem WHERE Version = "6.1%" and
ProductType = "1"
Read more about WMI Filters on http://zeda.nl/en/?postid=20100327A
Post by TimParker
I now have XP SP3, Vista SP1 and Windows 7 as clients on my network. I
just ran into an issue with Screensavers and how I was targetting them
that I am still attempting to "clean up."
select version from win32_operatingsystem where version< "6"
For the Older XP SP3 and then the opposite for the Vista User (just
one - my Boss!). Now that I have added about 15 Windows 7 users. They
naturally would fall into what would be pulled by the "Vista" version
of this Filter (> "6").
I attempted to use "= 6.1.7600" for the Windows 7 users, but the Vista
one is still not acting properly. I also have the Vista Screensaver
only set up for my bosses User Account.
What should I be doing for targetting OS specific Policies? TIA.
Tim
--
Zeda.nl - Windows Advanced Tips & Tricks
--
Zeda.nl - Windows Advanced Tips & Tricks
Cary Shultz
2010-04-07 17:28:36 UTC
Permalink
ZEDA,

I am happy to 'help'. I took a spin over to your web site and it has lots
of good examples. I will spend some time there looking at things.

And, sorry - not trying to hijack this post!

Cary
Post by ZEDA
Cary,
You are right about that, narrowing it down is faster.
I used the wildcard because it's less complicated to people who are not
familiar with WMI (and therefore easier to explain).
The difference in this example is 0,09 seconds on my system, so as long as
you don't have a lot of GPO's using the filter, you wouldn't notice.
I'll add this to the posting on http://zeda.nl/en/?postid=20100327A It
sure is good to mention the difference in speed. Thanks.
ZEDA
Post by Cary Shultz
Good morning, Zeda!
Hey, not trying to hijack this post (I just posted a similar
question....not sure how I missed this post...I usually look before
posting a question).....
From a processing of the WMI Filter perspective would it not be
'smarter' to use "SELECT Version, ProductType FROM Win..." instead of
"SELECT * FROM Win...."? I remember from way back when seeing data that
enumerated the size of the query when using "SELECT *..." vs. "SELECT
Version, ProductType..." and it was substantial. Well, I guess that is
up for discussion.
I just like to optimize everything possible. We have very picky users
who notice when it takes 14 seconds vs. when it takes 18 seconds....
Thanks,
Cary
Post by ZEDA
SELECT * FROM Win32_OperatingSystem WHERE Version = "6.0%" and
ProductType = "1"
Note the %, which is the wildcard character. Then 'productType' part
tells the filter to only apply the GPO to client computers. If you
don't add that part, the GPO will also be applied to a Windows 2008
server.
SELECT * FROM Win32_OperatingSystem WHERE Version = "6.1%" and
ProductType = "1"
Read more about WMI Filters on http://zeda.nl/en/?postid=20100327A
Post by TimParker
I now have XP SP3, Vista SP1 and Windows 7 as clients on my network. I
just ran into an issue with Screensavers and how I was targetting them
that I am still attempting to "clean up."
select version from win32_operatingsystem where version< "6"
For the Older XP SP3 and then the opposite for the Vista User (just
one - my Boss!). Now that I have added about 15 Windows 7 users. They
naturally would fall into what would be pulled by the "Vista" version
of this Filter (> "6").
I attempted to use "= 6.1.7600" for the Windows 7 users, but the Vista
one is still not acting properly. I also have the Vista Screensaver
only set up for my bosses User Account.
What should I be doing for targetting OS specific Policies? TIA.
Tim
--
Zeda.nl - Windows Advanced Tips & Tricks
--
Zeda.nl - Windows Advanced Tips & Tricks
Loading...