+ 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
    16,314
    Thank Post
    901
    Thanked 1,798 Times in 1,549 Posts
    Blog Entries
    12
    Rep Power
    466
    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
    11,270
    Thank Post
    884
    Thanked 2,747 Times in 2,321 Posts
    Blog Entries
    11
    Rep Power
    785
    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.403651, -0.515458
    Posts
    9,629
    Thank Post
    250
    Thanked 2,908 Times in 2,140 Posts
    Rep Power
    829
    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
    16,314
    Thank Post
    901
    Thanked 1,798 Times in 1,549 Posts
    Blog Entries
    12
    Rep Power
    466
    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.403651, -0.515458
    Posts
    9,629
    Thank Post
    250
    Thanked 2,908 Times in 2,140 Posts
    Rep Power
    829
    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
    16,314
    Thank Post
    901
    Thanked 1,798 Times in 1,549 Posts
    Blog Entries
    12
    Rep Power
    466
    @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 08:15 PM.

  8. #37


    Join Date
    Feb 2007
    Location
    51.403651, -0.515458
    Posts
    9,629
    Thank Post
    250
    Thanked 2,908 Times in 2,140 Posts
    Rep Power
    829
    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 03: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
    16,314
    Thank Post
    901
    Thanked 1,798 Times in 1,549 Posts
    Blog Entries
    12
    Rep Power
    466
    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
    16,314
    Thank Post
    901
    Thanked 1,798 Times in 1,549 Posts
    Blog Entries
    12
    Rep Power
    466
    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.403651, -0.515458
    Posts
    9,629
    Thank Post
    250
    Thanked 2,908 Times in 2,140 Posts
    Rep Power
    829
    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
    16,314
    Thank Post
    901
    Thanked 1,798 Times in 1,549 Posts
    Blog Entries
    12
    Rep Power
    466
    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,157
    Thank Post
    140
    Thanked 148 Times in 129 Posts
    Rep Power
    67
    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
    16,314
    Thank Post
    901
    Thanked 1,798 Times in 1,549 Posts
    Blog Entries
    12
    Rep Power
    466
    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,157
    Thank Post
    140
    Thanked 148 Times in 129 Posts
    Rep Power
    67
    Thanks for that, much appreciated !

  18. #45
    kennysarmy's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    1,347
    Thank Post
    85
    Thanked 47 Times in 33 Posts
    Rep Power
    31
    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, 03:43 PM
  2. Replies: 3
    Last Post: 20th May 2010, 03:10 PM
  3. Replies: 0
    Last Post: 17th May 2010, 10:25 AM
  4. Replies: 42
    Last Post: 20th November 2008, 11:58 AM

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 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
  •