+ Post New Thread
Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 48
Windows Thread, WMI Filters for Windows 7, XP & Server 2008 R2 Terminal Server in Technical; Hi, I am looking for a WMI for Windows ThinPC. I wonder if anyone can help please? Thanks...
  1. #31

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,777
    Thank Post
    865
    Thanked 1,664 Times in 1,449 Posts
    Blog Entries
    11
    Rep Power
    442
    Hi,

    I am looking for a WMI for Windows ThinPC. I wonder if anyone can help please?

    Thanks

  2. #32

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    10,991
    Thank Post
    851
    Thanked 2,653 Times in 2,253 Posts
    Blog Entries
    9
    Rep Power
    764
    Run this on one "wmic OS Get Caption" assuming it has that exe and then filter by what it says. it should give you the OS caption which it probably different and so filterable for.

  3. #33


    Join Date
    Feb 2007
    Location
    51.405546, -0.510212
    Posts
    8,709
    Thank Post
    220
    Thanked 2,615 Times in 1,926 Posts
    Rep Power
    777
    Here's the PowerShell equivalent of Synack's WMIC command should you need it.

    Code:
    (Get-WmiObject -Class win32_OperatingSystem).caption

  4. #34

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,777
    Thank Post
    865
    Thanked 1,664 Times in 1,449 Posts
    Blog Entries
    11
    Rep Power
    442
    Sorry for the long reply. Only just got time to carry on with the project.

    Once i have run that what would i do with the information displayed please?

  5. #35


    Join Date
    Feb 2007
    Location
    51.405546, -0.510212
    Posts
    8,709
    Thank Post
    220
    Thanked 2,615 Times in 1,926 Posts
    Rep Power
    777
    A few examples...

    Windows 7 Ultimate
    Code:
    Select * FROM Win32_OperatingSystem WHERE (Caption = "Microsoft Windows 7 Ultimate")
    Windows 7 (All Editions)
    Code:
    Select * FROM Win32_OperatingSystem WHERE (Caption LIKE "Microsoft Windows 7%")

  6. Thanks to Arthur from:

    FN-GM (18th January 2012)

  7. #36

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,777
    Thank Post
    865
    Thanked 1,664 Times in 1,449 Posts
    Blog Entries
    11
    Rep Power
    442
    @Arthur Sorry for the long reply

    What do we need the brackets for? If i want to use the above caption to detect 7 and 32 bit would this do please?

    Code:
    SELECT * FROM WIN32_OperatingSystem WHERE (Caption LIKE "Microsoft Windows 7%") AND (OSArchitecture='32-bit')
    Thanks
    Last edited by FN-GM; 3rd March 2012 at 07:15 PM.

  8. #37


    Join Date
    Feb 2007
    Location
    51.405546, -0.510212
    Posts
    8,709
    Thank Post
    220
    Thanked 2,615 Times in 1,926 Posts
    Rep Power
    777
    Quote Originally Posted by FN-GM View Post
    What do we need the brackets for?
    I'm not sure why I did it, but the brackets aren't required in the example above. I think I woke up too early that day.

    For future reference, if you have a WMI filter which contains several different Boolean operators (ANDs and ORs for example), make sure you read this article first.

    Quote Originally Posted by FN-GM View Post
    If I want to use the above caption to detect 7 and 32 bit would this do please?
    Your example is fine. Another alternative would be to check the OS version...

    Code:
    SELECT * FROM WIN32_OperatingSystem WHERE Version LIKE '6.1.%' AND OSArchitecture='32-bit'
    I would also try to avoid using too many WMI filters if you can. Item-level targeting of GPPs will almost always be faster (if that is an option?)...

    WMI filters take some percentage of performance away each and every time Group Policy processing is evaluated. That is, at every logon, at startup and every 90 minutes thereafter, you'll take a little performance hit because WMI filters are re-evaluated. So, be careful and don’t link a GPO to the domain level or every single Windows XP machine and later will work hard to evaluate that WMI query. (Source)
    WMI Filters have been around since Windows XP/2003 and are a great way to filter your Group Policy Objects based on the hardware of the computer that the policy is applied. However performing a WMI queries can take a substantial amount of time and if you have multiple WMI filters applying to your computers you have a significant performance decrease. Once again you can get around having to resort to using WMI Filters as Group Policy Preference Item-Level Targeting also have a number of options you can target hardware. Unlike WMI the Preference targeting engine has the performance advantage of being written in native code so it is much faster at determining what setting to apply. (Source)
    Last edited by Arthur; 5th March 2012 at 02:42 AM.

  9. Thanks to Arthur from:

    FN-GM (5th March 2012)

  10. #38

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,777
    Thank Post
    865
    Thanked 1,664 Times in 1,449 Posts
    Blog Entries
    11
    Rep Power
    442
    I would also try to avoid using too many WMI filters if you can. Item-level targeting of GPPs will almost always be faster (if that is an option?)...
    For what I am using it won't help :-) Also I only have a few I am tweaking existing ones.

    I also can't use the WMI thta you posted as it picks up Windows Thin PC as well so that's why I am making tweaks to the existing ones.


    Thanks for your help :-)

  11. #39

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,777
    Thank Post
    865
    Thanked 1,664 Times in 1,449 Posts
    Blog Entries
    11
    Rep Power
    442
    Hi @Arthur do you know a WMI to pickup a clientname on an RDP session please? The option i want to do cant be done via group policy preferences.

    Thanks

  12. #40


    Join Date
    Feb 2007
    Location
    51.405546, -0.510212
    Posts
    8,709
    Thank Post
    220
    Thanked 2,615 Times in 1,926 Posts
    Rep Power
    777
    Not sure to be honest. Are you able to use the %ClientName% environment variable like you did in this thread?

  13. #41

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,777
    Thank Post
    865
    Thanked 1,664 Times in 1,449 Posts
    Blog Entries
    11
    Rep Power
    442
    Yep seems to work, i dont think its possible. I have been googling and found nothing.

    Thanks

  14. #42
    rich_tech's Avatar
    Join Date
    Mar 2011
    Location
    Wales
    Posts
    1,012
    Thank Post
    128
    Thanked 130 Times in 113 Posts
    Rep Power
    63
    Apologies for raising a very old thread here, I really dont normally do this, but this has thrown up a possible answer to a fiddly problem were having at the moment and I want to know if what I propose is achievable :-

    Code:
    SELECT * FROM Win32_OperatingSystem WHERE Version = '6.1%' AND ProductType = '1' AND ( OSArchitecture="32-bit" OR OSArchitecture="64-bit" )
    Basically, we are now looking at Windows 7 64 bit in the school that I work in and we are finding that our GPOs arent applying to the 64 bit clients, this is because of the existing 32 bit only filtering in place, so I am obviously trying to create a WMI filter to allow us to include the 64 bit machines into the fray, would the WMI filter that I have put above work ? (I got it off an existing 64 bit WMI filter in our forest and wanted to know if what I have altered in here is going to get the results we want.

    or can anyone help guide me in the right path if possible ?

    Thanks,

    Richard

  15. #43

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,777
    Thank Post
    865
    Thanked 1,664 Times in 1,449 Posts
    Blog Entries
    11
    Rep Power
    442
    Code:
    select * from Win32_OperatingSystem where Version like "6.1%" and ProductType = "1"
    That will pickup both 32 and 64

  16. Thanks to FN-GM from:

    rich_tech (17th April 2012)

  17. #44
    rich_tech's Avatar
    Join Date
    Mar 2011
    Location
    Wales
    Posts
    1,012
    Thank Post
    128
    Thanked 130 Times in 113 Posts
    Rep Power
    63
    Thanks for that, much appreciated !

  18. #45
    kennysarmy's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    1,286
    Thank Post
    80
    Thanked 45 Times in 31 Posts
    Rep Power
    30
    Slightly different take on the same theme:

    I have the following working WMI filters:

    Select * from Win32_OperatingSystem Where Version like "5.1%" and ProductType = "1"
    Select * from Win32_OperatingSystem Where Version like "6.1%" and ProductType = "1"

    So I can target XP and Win7 seperately.

    I know want to add Win7 64bit in to the fray as a new WMI filter

    Anything existing can be filetered as is I reckon, so I just need a new WMI filter so I can target specific policies to 64 bit windows 7.

    Would this work for the new WMI filter?
    Select * from Win32_OperatingSystem Where Version like "6.1%" and ProductType = "1" and AddressWidth="64"

    I am also wondering if I should edit my existing WMI filter for Windows 7 so that it applies only to 32 bit.

    Or would three WMI filters for Windows 7 give me most flexibility.
    One for all flavours, one for 32 bit and one fore 64 bit

    Does anyone else do it that way?

    So I am guessing I would have:

    Select * from Win32_OperatingSystem Where Version like "6.1%" and ProductType = "1" and AddressWidth="64"
    Select * from Win32_OperatingSystem Where Version like "6.1%" and ProductType = "1" and AddressWidth="32"
    SELECT * FROM Win32_OperatingSystem WHERE Version = '6.1%' AND ProductType = '1' AND ( OSArchitecture="32-bit" OR OSArchitecture="64-bit" )

    Comments appreciated.

SHARE:
+ Post New Thread
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Exchange 2007 SP3 with support for Windows Server 2008 R2
    By IanT in forum Windows Server 2008 R2
    Replies: 0
    Last Post: 28th June 2010, 02:43 PM
  2. Replies: 3
    Last Post: 20th May 2010, 02:10 PM
  3. Replies: 0
    Last Post: 17th May 2010, 09:25 AM
  4. Replies: 42
    Last Post: 20th November 2008, 10:58 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •