Active Directory

Create WMI Filters for the GPO

To create a WMI filter that queries for a specified version of Windows

  1. On a computer that has the Group Policy Management feature installed, click Start, click Administrative Tools, and then click Group Policy Management.
  2. Kullanıcı Hesabı Denetimi iletişim kutusu görüntülenirse, görüntülenen eylemin kullanmak istediğiniz eylem olduğunu doğrulayın ve sonra da Devam‘ı tıklatın.
  3. In the navigation pane, expand Forest: YourForestName, expand Domains, expand YourDomainName, and then click WMI Filters.
  4. Click Action, and then click New.
  5. In the Name text box, type the name of the WMI filter.
  6. In the Description text box, type a description for the WMI filter. For example, if the filter excludes domain controllers, you might consider stating that in the description.
  7. Click Add.
  8. Leave the Namespace value set to root\CIMv2.
  9. In the Query text box, type:
    select * from Win32_OperatingSystem where Version like "6.0%"
    

    This query will return true for computers running Windows Vista or Windows Server 2008. To set a filter for Windows Server 2003, use "5.2%". For Windows XP, use"5.1%". For Windows 2000, use "5.0%". To specify multiple versions, combine them with or, as shown in the following:

    ... where Version like "6.0%" or Version like "5.2%"
    

    The following query returns true for any computer running Windows 2000, Windows XP, or Windows Server 2003, and false for any other version of Windows.

    ... where Version like "5.%"
    

    To restrict the query to only clients or only servers, add a clause that includes the ProductType parameter. To filter for client operating systems only, such as Windows XP or Windows Vista, use only ProductType="1". For server operating systems that are not domain controllers, use ProductType="3". For domain controllers only, useProductType="2". This is a useful distinction, because you often want to prevent your GPOs from being applied to the domain controllers on your network.

    The following clause returns true for all computers that are not domain controllers:

    ... where ProductType="1" or ProductType="3"
    

    The following complete query returns true for all computers running Windows Vista, and returns false for any server operating system or any other client operating system.

    select * from Win32_OperatingSystem where Version like "6.0%" and ProductType="1"
    

    The following query returns true for any computer running Windows Server 2003, except domain controllers:

    select * from Win32_OperatingSystem where Version like "5.2%" and ProductType="3"
    
    1. Click OK to save the query to the filter.
    2. Click Save to save your completed filter.

    After you have created a filter with the correct query, link the filter to the GPO. Filters can be reused with many GPOs simultaneously; you do not have to create a new one for each GPO if an existing one meets your needs.

    To link a WMI filter to a GPO

    1. On a computer that has the Group Policy Management feature installed, click Start, click Administrative Tools, and then click Group Policy Management.
    2. Kullanıcı Hesabı Denetimi iletişim kutusu görüntülenirse, görüntülenen eylemin kullanmak istediğiniz eylem olduğunu doğrulayın ve sonra da Devam‘ı tıklatın.
    3. In the navigation pane, find and then click the GPO that you want to modify.
    4. Under WMI Filtering, select the correct WMI filter from the list.
    5. Click Yes to accept the filter.

Bir Cevap Yazın

Aşağıya bilgilerinizi girin veya oturum açmak için bir simgeye tıklayın:

WordPress.com Logosu

WordPress.com hesabınızı kullanarak yorum yapıyorsunuz. Çıkış  Yap /  Değiştir )

Twitter resmi

Twitter hesabınızı kullanarak yorum yapıyorsunuz. Çıkış  Yap /  Değiştir )

Facebook fotoğrafı

Facebook hesabınızı kullanarak yorum yapıyorsunuz. Çıkış  Yap /  Değiştir )

Connecting to %s