+ Post New Thread
Page 2 of 4 FirstFirst 1234 LastLast
Results 16 to 30 of 48
Windows Thread, WMI Filters for Windows 7, XP & Server 2008 R2 Terminal Server in Technical; Originally Posted by Arthur Terminal Session Targeting (in 2008/2008 R2)? Never knew that existed. Thanks...
  1. #16

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,227
    Thank Post
    894
    Thanked 1,776 Times in 1,532 Posts
    Blog Entries
    12
    Rep Power
    461
    Quote Originally Posted by Arthur View Post
    Terminal Session Targeting (in 2008/2008 R2)?
    Never knew that existed. Thanks

  2. #17

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,227
    Thank Post
    894
    Thanked 1,776 Times in 1,532 Posts
    Blog Entries
    12
    Rep Power
    461
    Sorry me again.

    For re-directed start menus i will have to separate Windows 7 x86 & x64.

    Would you use these WMI please?

    select * from Win32_OperatingSystem WHERE Version like "6.1%" AND ProductType="1" AND WHERE OSArchitecture='32-bit'

    select * from Win32_OperatingSystem WHERE Version like "6.1%" AND ProductType="1" AND WHERE OSArchitecture='64-bit'

    Thanks

  3. #18


    Join Date
    Feb 2007
    Location
    51.403651, -0.515458
    Posts
    9,390
    Thank Post
    241
    Thanked 2,817 Times in 2,078 Posts
    Rep Power
    813
    These should do it...

    Windows 7 x86
    Code:
    SELECT * FROM WIN32_OperatingSystem WHERE Version LIKE '6.1.%' AND ProductType=1 AND OSArchitecture='32-bit'
    Windows 7 x64
    Code:
    SELECT * FROM WIN32_OperatingSystem WHERE Version LIKE '6.1.%' AND ProductType=1 AND OSArchitecture='64-bit'

  4. Thanks to Arthur from:

    FN-GM (25th April 2011)

  5. #19

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,227
    Thank Post
    894
    Thanked 1,776 Times in 1,532 Posts
    Blog Entries
    12
    Rep Power
    461
    Hi me again

    I want to make a WMI that will NOT apply to computers not begging with LAP.

    Would this do the trick please?

    Code:
    SELECT * FROM Win32_ComputerSystem WHERE IS NOT Name LIKE 'LAP%'
    Thanks very much
    Last edited by FN-GM; 16th May 2011 at 06:30 PM.

  6. #20


    Join Date
    Feb 2007
    Location
    51.403651, -0.515458
    Posts
    9,390
    Thank Post
    241
    Thanked 2,817 Times in 2,078 Posts
    Rep Power
    813
    Code:
    SELECT * FROM Win32_ComputerSystem WHERE NOT Name LIKE "LAP%"
    or

    Code:
    SELECT * FROM Win32_OperatingSystem WHERE (NOT CSName LIKE "LAP%") AND (Version LIKE "6.1%" AND ProductType = "1")
    The second WMI query will do what you originally wanted to do.

  7. Thanks to Arthur from:

    FN-GM (17th May 2011)

  8. #21

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,227
    Thank Post
    894
    Thanked 1,776 Times in 1,532 Posts
    Blog Entries
    12
    Rep Power
    461
    Ha thanks,

    What i am doing it setup a redirected start menu, but i do not want it to apply when a user logs into a laptop.

    Thanks

  9. #22

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,227
    Thank Post
    894
    Thanked 1,776 Times in 1,532 Posts
    Blog Entries
    12
    Rep Power
    461
    Hi I am using this code to apply a group policy to laptops begging with LTOP.

    Code:
    SELECT * FROM Win32_ComputerSystem WHERE Name LIKE 'LTOP%'
    The computer is called LTOP-001 but the policy does not apply with the WMI on. If i remove it the policy applies just fine when i enable it again it fails to work.

    Any ideas please?
    Last edited by FN-GM; 7th July 2011 at 03:09 PM.

  10. #23

    Join Date
    Mar 2011
    Location
    Bournemouth
    Posts
    280
    Thank Post
    16
    Thanked 74 Times in 64 Posts
    Rep Power
    22
    Aren't your laptops in a different OU? WMI filters are slow and shoudn't really be used instead of good AD organisation.

    Make a Laptops OU, move them into it and apply the policy to that OU only.

  11. #24

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,227
    Thank Post
    894
    Thanked 1,776 Times in 1,532 Posts
    Blog Entries
    12
    Rep Power
    461
    Quote Originally Posted by ChrisMiles View Post
    Aren't your laptops in a different OU? WMI filters are slow and shoudn't really be used instead of good AD organisation.

    Make a Laptops OU, move them into it and apply the policy to that OU only.
    They already are in there own OU. Anyway its a user policy so doing that wouldnt apply

  12. #25

    Join Date
    Mar 2011
    Location
    Bournemouth
    Posts
    280
    Thank Post
    16
    Thanked 74 Times in 64 Posts
    Rep Power
    22
    Quote Originally Posted by FN-GM View Post
    They already are in there own OU. Anyway its a user policy so doing that wouldnt apply
    Ok, sorry then, that's no help.

    The WMI query is correct. The only thing I can think is that wmi doesnt correctly report the computer name at the point during startup where the filter is checked.

    Maybe try filtering on DNSHostName instead?

  13. #26

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,227
    Thank Post
    894
    Thanked 1,776 Times in 1,532 Posts
    Blog Entries
    12
    Rep Power
    461

    They already are in there own OU. Anyway its a user policy so doing that wouldnt apply
    Ok, sorry then, that's no help.

    The WMI query is correct. The only thing I can think is that wmi doesnt correctly report the computer name at the point during startup where the filter is checked.

    Maybe try filtering on DNSHostName instead?

    Working now, just started to work for some reason

    SELECT * FROM Win32_OperatingSystem WHERE (NOT CSName LIKE "LAP%") AND (Version LIKE "6.1%" AND ProductType = "1")
    Will this code apply a policy to computers that:
    Are not begging with LAP
    But is a Windows 7 machine?

    Thanks
    Last edited by FN-GM; 18th July 2011 at 12:58 PM.

  14. #27


    Join Date
    Feb 2007
    Location
    51.403651, -0.515458
    Posts
    9,390
    Thank Post
    241
    Thanked 2,817 Times in 2,078 Posts
    Rep Power
    813
    The WMI filter looks fine to me.

    Btw, if you wanted to quickly test whether or not it will apply, you could use a program called WMI Filter Validator.

  15. Thanks to Arthur from:

    FN-GM (18th July 2011)

  16. #28

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,227
    Thank Post
    894
    Thanked 1,776 Times in 1,532 Posts
    Blog Entries
    12
    Rep Power
    461
    Thanks

  17. #29

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,227
    Thank Post
    894
    Thanked 1,776 Times in 1,532 Posts
    Blog Entries
    12
    Rep Power
    461
    Hi,

    Im not in work so cant use the WMI Filter Validator. I just put this together, would this do the same as post 26 and only apply to 32 bit machines?

    Code:
    SELECT * FROM Win32_OperatingSystem WHERE (NOT CSName LIKE "LAP%") AND (Version LIKE "6.1%" AND ProductType = "1") AND (OSArchitecture='32-bit')
    Would this apply to machines begging with LAP that are 32bit machines?

    Code:
    SELECT * FROM Win32_ComputerSystem WHERE (Name LIKE 'LAP%') AND (OSArchitecture='32-bit')
    Sorry to pester just want to get this bang on

  18. #30


    Join Date
    Feb 2007
    Location
    51.403651, -0.515458
    Posts
    9,390
    Thank Post
    241
    Thanked 2,817 Times in 2,078 Posts
    Rep Power
    813
    The first one looks fine, although you don't really need all of those brackets...

    Code:
    SELECT * FROM Win32_OperatingSystem WHERE (NOT CSName LIKE "LAP%") AND (Version LIKE "6.1%" AND ProductType = "1" AND OSArchitecture='32-bit')
    
    or
    
    SELECT * FROM Win32_OperatingSystem WHERE NOT CSName LIKE "LAP%" AND Version LIKE "6.1%" AND ProductType = "1" AND OSArchitecture='32-bit'
    The second filter won't work however because the Win32_ComputerSystem class doesn't have a property called OSArchitecture. Use this instead...

    Code:
    SELECT * FROM Win32_OperatingSystem WHERE CSName LIKE 'LAP%' AND OSArchitecture='32-bit'

  19. Thanks to Arthur from:

    FN-GM (25th July 2011)

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