+ Post New Thread
Page 1 of 4 1234 LastLast
Results 1 to 15 of 48
Windows Thread, WMI Filters for Windows 7, XP & Server 2008 R2 Terminal Server in Technical; Hi, I am after some WMI Filters. for the following Windows XP Machines (32 Bit) Windows 7 Machines (32 Bit ...
  1. #1

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,054
    Thank Post
    888
    Thanked 1,729 Times in 1,492 Posts
    Blog Entries
    12
    Rep Power
    454

    WMI Filters for Windows 7, XP & Server 2008 R2 Terminal Server

    Hi,

    I am after some WMI Filters. for the following

    Windows XP Machines (32 Bit)
    Windows 7 Machines (32 Bit maybe 64)
    Windows Server 2008 R2 Terminal Server Session

    I have found the following for Windows XP Machines

    Code:
    Root\CimV2; Select * from Win32_OperatingSystem where Caption = "Microsoft Windows XP Professional"
    I have found this for Windows 7 Machines

    Code:
    select * from Win32_OperatingSystem WHERE Version like "6.1%" AND ProductType="1"
    For Server 2008 R2 i have come up with nothing. As Server 2008 is windows 6.1 will it apply the above WMI? Maybe we could have something like this for Server 2008 R2 and 7? Will the below ones work?

    Code:
    Root\CimV2; Select * from Win32_OperatingSystem where Caption = "Microsoft Windows 7"
    Code:
    Root\CimV2; Select * from Win32_OperatingSystem where Caption = "Microsoft Windows Server 2008 R2"

    Thanks

  2. #2
    mounters's Avatar
    Join Date
    Mar 2006
    Location
    Northumberland
    Posts
    199
    Thank Post
    22
    Thanked 70 Times in 59 Posts
    Rep Power
    29

  3. Thanks to mounters from:

    FN-GM (14th April 2011)

  4. #3

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,054
    Thank Post
    888
    Thanked 1,729 Times in 1,492 Posts
    Blog Entries
    12
    Rep Power
    454
    Ok so for windows XP i will have:

    Code:
    select * from Win32_OperatingSystem where Version like "5.1%" and ProductType = "1"
    For Windows 7 I will have

    Code:
    select * from Win32_OperatingSystem where Version like "6.1%" and ProductType = "1"
    For Server 2008 R2 i will have

    Code:
    select * from Win32_OperatingSystem where Version like "6.1%" and ProductType = "3"
    Thanks allot

  5. #4
    mounters's Avatar
    Join Date
    Mar 2006
    Location
    Northumberland
    Posts
    199
    Thank Post
    22
    Thanked 70 Times in 59 Posts
    Rep Power
    29
    Are you sure? Do you not just need to use the ProductType and then 1 = clients, 2 = servers that are DCs, 3 = member servers.

  6. #5
    mounters's Avatar
    Join Date
    Mar 2006
    Location
    Northumberland
    Posts
    199
    Thank Post
    22
    Thanked 70 Times in 59 Posts
    Rep Power
    29
    Beat me to it!

  7. #6

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,054
    Thank Post
    888
    Thanked 1,729 Times in 1,492 Posts
    Blog Entries
    12
    Rep Power
    454
    Quote Originally Posted by mounters View Post
    Beat me to it!
    I deleted the last post as i cant read!

    So do those filters sound ok to you?

    I shall be doing some testing this weekend!

    Thanks

  8. #7
    mounters's Avatar
    Join Date
    Mar 2006
    Location
    Northumberland
    Posts
    199
    Thank Post
    22
    Thanked 70 Times in 59 Posts
    Rep Power
    29
    Yep they look good to me.

  9. Thanks to mounters from:

    FN-GM (14th April 2011)

  10. #8

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,054
    Thank Post
    888
    Thanked 1,729 Times in 1,492 Posts
    Blog Entries
    12
    Rep Power
    454
    I also assume you can apply these to user & computer policies?

    Also i assume that the namespace is set to root\CIMv2

    Thanks
    Last edited by FN-GM; 14th April 2011 at 10:16 AM.

  11. #9
    mounters's Avatar
    Join Date
    Mar 2006
    Location
    Northumberland
    Posts
    199
    Thank Post
    22
    Thanked 70 Times in 59 Posts
    Rep Power
    29
    Yes, they apply to both.

  12. Thanks to mounters from:

    FN-GM (14th April 2011)

  13. #10


    Join Date
    Feb 2007
    Location
    51.403651, -0.515458
    Posts
    9,065
    Thank Post
    232
    Thanked 2,717 Times in 2,005 Posts
    Rep Power
    795
    Re: post #3, there are lots of different ways of doing the same thing...

    Code:
    Windows XP
    SELECT Version, ProductType FROM Win32_OperatingSystem WHERE Version = '5.1%' AND ProductType = '1'
    SELECT Version, ProductType from Win32_OperatingSystem WHERE Version = '5.1.2600' AND ProductType = '1'
    SELECT Version, ProductType from Win32_OperatingSystem WHERE Version LIKE '5.1.%' AND ProductType = '1'
    Code:
    Windows 7
    SELECT Version, ProductType FROM Win32_OperatingSystem WHERE Version = '6.1%' AND ProductType = '1'
    SELECT Version, ProductType FROM Win32_OperatingSystem WHERE Version = '6.1.7600' AND ProductType = '1'
    SELECT Version, ProductType FROM Win32_OperatingSystem WHERE Version LIKE '6.1.%' AND ProductType = '1'
    Code:
    Windows Server 2008 R2
    SELECT Version, ProductType FROM Win32_OperatingSystem WHERE Version = '6.1%' AND ProductType <> '1'
    SELECT Version, ProductType FROM Win32_OperatingSystem WHERE Version = '6.1.7600' AND ( ProductType = '2' OR ProductType = '3' )
    SELECT Version, ProductType FROM Win32_OperatingSystem WHERE Version LIKE '6.1.%' AND ProductType <> '1'
    Some other filters you may find useful...

    Code:
    32-bit OS
    SELECT OSArchitecture FROM Win32_OperatingSystem WHERE OSArchitecture='32-bit'
    Code:
    64-bit OS
    SELECT OSArchitecture FROM Win32_OperatingSystem WHERE OSArchitecture='64-bit'
    Code:
    NOT A Server OS
    SELECT ProductType FROM Win32_OperatingSystem WHERE ProductType = '1'
    Code:
    NOT a laptop (assumes every laptop uses SO-DIMM RAM)
    SELECT FormFactor FROM Win32_PhysicalMemory WHERE FormFactor != 12

  14. #11

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,054
    Thank Post
    888
    Thanked 1,729 Times in 1,492 Posts
    Blog Entries
    12
    Rep Power
    454
    Does anyone have a WMI that will only apply a computer that begins with ZY4 please?

    We have some computers called ZY4-01, ZY4-02 etc..

    Thanks

  15. #12


    Join Date
    Feb 2007
    Location
    51.403651, -0.515458
    Posts
    9,065
    Thank Post
    232
    Thanked 2,717 Times in 2,005 Posts
    Rep Power
    795
    Code:
    SELECT * FROM Win32_ComputerSystem WHERE Name LIKE 'ZY4%'
    
    or
    
    SELECT Name FROM Win32_ComputerSystem WHERE Name LIKE 'ZY4%'
    In fact, you can query the computer name from literally any WMI class. e.g.

    Code:
    SELECT SystemName FROM Win32_ParallelPort WHERE SystemName LIKE 'ZY4%'
    If you should ever need to query more than one group of computers, you can do it like this...

    Code:
    SELECT * FROM Win32_ComputerSystem WHERE (Name LIKE 'ZY4%' OR Name LIKE 'ZY5%')
    Last edited by Arthur; 16th April 2011 at 11:08 AM.

  16. Thanks to Arthur from:

    FN-GM (18th April 2011)

  17. #13

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,054
    Thank Post
    888
    Thanked 1,729 Times in 1,492 Posts
    Blog Entries
    12
    Rep Power
    454
    Thanks will give them a try.

  18. #14

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,054
    Thank Post
    888
    Thanked 1,729 Times in 1,492 Posts
    Blog Entries
    12
    Rep Power
    454
    Me again

    I was wondering if you know of a WMI that will apply a user policy based on Client Name? I would like to apply a policy for users that use a thin client based on the thin client name. When you make a script in VBS instead of using computer name you use client name.

    Do you have any ideas please?

    Thanks

  19. #15


    Join Date
    Feb 2007
    Location
    51.403651, -0.515458
    Posts
    9,065
    Thank Post
    232
    Thanked 2,717 Times in 2,005 Posts
    Rep Power
    795
    Terminal Session Targeting (in 2008/2008 R2)?

  20. Thanks to Arthur from:

    FN-GM (21st April 2011)

SHARE:
+ Post New Thread
Page 1 of 4 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
  •