Меню Рубрики

Windows 10 wmi filter

Create WMI Filters for the GPO

Applies to

  • WindowsВ 10
  • Windows Server 2016

To make sure that each GPO associated with a group can only be applied to devices running the correct version of Windows, use the Group Policy Management MMC snap-in to create and assign WMI filters to the GPO. Although you can create a separate membership group for each GPO, you would then have to manage the memberships of the different groups. Instead, use only a single membership group, and let WMI filters automatically ensure the correct GPO is applied to each device.

Administrative credentials

To complete these procedures, you must be a member of the Domain Administrators group, or otherwise be delegated permissions to modify the GPOs.

First, create the WMI filter and configure it to look for a specified version (or versions) of the Windows operating system.

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

Open the Group Policy Management console.

In the navigation pane, expand Forest: YourForestName, expand Domains, expand YourDomainName, and then click WMI Filters.

Click Action, and then click New.

In the Name text box, type the name of the WMI filter.

Note:В В Be sure to use a name that clearly indicates the purpose of the filter. Check to see if your organization has a naming convention.

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.

Click Add.

Leave the Namespace value set to root\CIMv2.

In the Query text box, type:

This query will return true for devices running at least WindowsВ Vista and Windows ServerВ 2008. To set a filter for just Windows 8 and Windows Server 2012, use «6.2%». For Windows 10 and Windows Server 2016, use «10.%». To specify multiple versions, combine them with or, as shown in the following:

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 8 or WindowsВ 7, use only ProductType=»1″. For server operating systems that are not domain controllers, use ProductType=»3″. For domain controllers only, use ProductType=»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 devices that are not domain controllers:

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

The following query returns true for any device running Windows Server 2016, except domain controllers:

Click OK to save the query to the filter.

Click Save to save your completed filter.

If you’re using multiple queries in the same WMI filter, these queries must all return TRUE for the filter requirements to be met and for the GPO to be applied.

To link a WMI filter to a GPO

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.

Open the Group Policy Management console.

In the navigation pane, find and then click the GPO that you want to modify.

Under WMI Filtering, select the correct WMI filter from the list.

Click Yes to accept the filter.

Источник

Создание фильтров WMI для объекта групповой политики Create WMI Filters for the GPO

Относится к: Applies to

  • Windows 10 Windows10
  • Windows Server2016 Windows Server 2016

Чтобы убедиться в том, что каждый GPO, связанный с группой, может быть применен только к устройствам, использующим соответствующую версию Windows, используйте оснастку управления групповыми политиками для создания и назначения фильтров WMI для GPO. To make sure that each GPO associated with a group can only be applied to devices running the correct version of Windows, use the Group Policy Management MMC snap-in to create and assign WMI filters to the GPO. Несмотря на то, что вы можете создать отдельную группу участников для каждого объекта групповой политики, вам потребуется управлять членством в разных группах. Although you can create a separate membership group for each GPO, you would then have to manage the memberships of the different groups. Вместо этого используйте единственную группу участников и разрешите фильтрам WMI автоматический уровень применения правильного GPO к каждому устройству. Instead, use only a single membership group, and let WMI filters automatically ensure the correct GPO is applied to each device.

Учетные данные администратора Administrative credentials

Для выполнения описанных ниже действий необходимо быть членом группы администраторов домена или иным образом делегированными разрешениями для изменения объектов групповой политики. To complete these procedures, you must be a member of the Domain Administrators group, or otherwise be delegated permissions to modify the GPOs.

Сначала создайте фильтр WMI и настройте его так, чтобы он выглядел для указанной версии (или версий) операционной системы Windows. First, create the WMI filter and configure it to look for a specified version (or versions) of the Windows operating system.

Создание фильтра WMI, который запрашивает указанную версию Windows To create a WMI filter that queries for a specified version of Windows

Откройте консоль управления групповыми политиками. Open the Group Policy Management console.

В области навигации разверните элемент лес: YourForestName, разверните раздел Domains (домены), разверните YourDomainNameи выберите пункт фильтры WMI. In the navigation pane, expand Forest: YourForestName, expand Domains, expand YourDomainName, and then click WMI Filters.

Нажмите кнопку действие, а затем — создать. Click Action, and then click New.

В текстовом поле имя введите имя фильтра WMI. In the Name text box, type the name of the WMI filter.

Примечание. Не забудьте использовать имя, которое ясно указывает цель фильтра. Note: Be sure to use a name that clearly indicates the purpose of the filter. Убедитесь, что в вашей организации задано соглашение об именовании. Check to see if your organization has a naming convention.

В текстовом поле Описание введите описание фильтра WMI. 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.

Щелкните Добавить. Click Add.

Оставьте значение пространства имен равным root\CIMv2. Leave the Namespace value set to root\CIMv2.

В текстовом поле запрос введите: In the Query text box, type:

Этот запрос возвращает значение true для устройств, работающих по крайней мере windowsvista и Windows Server2008. This query will return true for devices running at least WindowsVista and Windows Server2008. Чтобы установить фильтр только для Windows 8 и Windows Server 2012, используйте «6,2%». To set a filter for just Windows 8 and Windows Server 2012, use «6.2%». Для Windows 10 и Windows Server 2016 используйте «10 .%». For Windows 10 and Windows Server 2016, use «10.%». Чтобы указать несколько версий, объедините их с помощью или, как показано в следующем примере: To specify multiple versions, combine them with or, as shown in the following:

Чтобы ограничить запрос только клиентами или серверами, добавьте предложение, включающее параметр ProductType. To restrict the query to only clients or only servers, add a clause that includes the ProductType parameter. Чтобы отфильтровать только клиентские операционные системы (например, Windows 8 или Windows7), используйте только ProductType = «1». To filter for client operating systems only, such as Windows 8 or Windows7, use only ProductType=»1″. Для серверных операционных систем, которые не являются контроллерами домена, используйте ProductType = «3». For server operating systems that are not domain controllers, use ProductType=»3″. Только для контроллеров домена используйте ProductType = «2». For domain controllers only, use ProductType=»2″. Это полезное отличие, так как часто требуется предотвратить применение объектов групповой политики к контроллерам домена в сети. This is a useful distinction, because you often want to prevent your GPOs from being applied to the domain controllers on your network.

Следующее предложение возвращает значение true для всех устройств, которые не являются контроллерами домена. The following clause returns true for all devices that are not domain controllers:

Следующий полный запрос возвращает значение true для всех устройств, работающих под управлением Windows 10, и возвращает значение false для любой серверной операционной системы или любой другой клиентской операционной системы. The following complete query returns true for all devices running Windows 10, and returns false for any server operating system or any other client operating system.

Следующий запрос возвращает значение истина для любого устройства под управлением Windows Server 2016, за исключением контроллеров домена. The following query returns true for any device running Windows Server 2016, except domain controllers:

Нажмите кнопку ОК , чтобы сохранить запрос в фильтр. Click OK to save the query to the filter.

Нажмите кнопку сохранить , чтобы сохранить завершенный фильтр. Click Save to save your completed filter.

Если вы используете несколько запросов в одном и том же фильтре WMI, эти запросы должны возвращать значение true , чтобы требования фильтра были выполнены, а также для применения GPO. If you’re using multiple queries in the same WMI filter, these queries must all return TRUE for the filter requirements to be met and for the GPO to be applied.

Связывание фильтра WMI с объектом групповой политики To link a WMI filter to a GPO

После создания фильтра с правильным запросом Свяжите фильтр с объектом групповой политики. 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.

Откройте консоль управления групповыми политиками. Open the Group Policy Management console.

В области навигации найдите и щелкните объект групповой политики, который вы хотите изменить. In the navigation pane, find and then click the GPO that you want to modify.

В разделе Фильтрация WMIвыберите НУЖНЫЙ фильтр WMI из списка. Under WMI Filtering, select the correct WMI filter from the list.

Нажмите кнопку Да , чтобы применить фильтр. Click Yes to accept the filter.

Источник

Windows. GPO. Использование WMI фильтров.

Доброе время суток.

Сегодня я расскажу о полезном инструменте фильтрации применения групповых политик.

WMI фильтры ( Windows Management Instrumentation ) необходимы для того чтобы оптимизировать применение политик.

Допустим вы создали объект групповой политики с помощью которого устанавливаете какой-либо софт на определённую группу компьютеров. Данный софт предназначен только для 64 разрядных систем. Но у вас в домене присутствуют компьютеры с 32 разрядными системами. При этом политика будет отрабатывать на все компьютеры, что ни есть оптимально.

Что бы политика применялась только к 64 разрядным системам необходимо в оснастки «Управление групповой политикой», выбрать пункт «Фильтры WMI». Щёлкнуть ПКМ по нему и нажать «Создать».

Далее в поле «Имя:» вводим название фильтра и добавляем WMI запрос:

SELECT AddressWidth FROM Win32_Processor WHERE AddressWidth =’64’

Что бы данный фильтр применялся групповыми политиками его необходимо выбрать в настройках объекта групповой политики. Для этого выделяем объект групповой политики ЛКМ и справа внизу выбираем «Фильтр WMI».

Теперь объект групповой политики будет применяться на основании WMI фильтра.

С помощью WMI фильтров можно добиться гибкости применения групповых политик.

  • отобрать компьютеры только с Windows 10

select * from Win32_OperatingSystem WHERE Version LIKE «10.%» and ProductType = «1»

  • или только компьютеры с Windows 7

select * from Win32_OperatingSystem where Version like «6.1%» and ProductType = «1»

  • или компьютеры с Windows 8.1 и Windows 10

select * from Win32_OperatingSystem where (Version like «6.3%» or Version like «10.%») and ProductType = «1»

  • или применить политику только к одному компьютеру «test-pc»

select * from win32_computersystem where name=»test-pc»

и многие другие WMI фильтры которые вам необходимы для оптимизации работы групповых политик.

Для более углубленного изучения WMI Query Language (WQL) добро пожаловать на сайт Microsoft

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

  • Windows 10 with msdn russian
  • Windows 10 wireless settings
  • Windows 10 windowsupdate log
  • Windows 10 windows update stop
  • Windows 10 windows metro apps