locked
WMI filter for OS RRS feed

  • Question

  • My company has a GPO that applies software based on a WMI filter that queries whether the OS is Windows XP Pro.  I would like to modify this to check the OS and see if it is Windows7.  Can anyone tell me if WMI filtering works on Windows7 and if so can you point me in the righ direction for a query that will work for this problem? 
    Wednesday, May 18, 2011 3:35 AM

Answers

  • yep, WMI filtering certainly works. The following WMI query will do as you require. Notice that you have to use ProductType = 1, this is because Windows Server 2008 R2 uses the same version. Also with service pack 1 the version changed slightly from 6.1.7600 to 6.1.7601, so the query will pick up both SP1 and non SP machines.

     

    SELECT * FROM Win32_OperatingSystem WHERE Version LIKE '6.1.76%%' AND ProductType = '1'
    

    Wednesday, May 18, 2011 4:32 AM

All replies

  • yep, WMI filtering certainly works. The following WMI query will do as you require. Notice that you have to use ProductType = 1, this is because Windows Server 2008 R2 uses the same version. Also with service pack 1 the version changed slightly from 6.1.7600 to 6.1.7601, so the query will pick up both SP1 and non SP machines.

     

    SELECT * FROM Win32_OperatingSystem WHERE Version LIKE '6.1.76%%' AND ProductType = '1'
    

    Wednesday, May 18, 2011 4:32 AM
  • I am in the process of testing and will advise on the results.  Thanks for the input.
    Wednesday, May 18, 2011 9:13 PM