WMI Filters to be used in GPO

From Tech-Wiki
Jump to: navigation, search

Back to Active Directory


This example of WMI filters to be used in GPOs to avoid applying to all users:


File presence:

 SELECT * FROM CIM_Datafile Where Name = 'C:\\Program Files (x86)\\Endpoint Security\\cpda.exe'

OS version (10.% for Win10/11/Server) and 6.2% for Win8:

 SELECT * FROMWin32_OperatingSystem where Version like "6.%"
 ... where Version like "6.1%" or Version like "6.2%"

Virtual machines:

SELECT Model FROM Win32_ComputerSystem WHERE Model LIKE "%VMware%"

Computer name:

SELECT * FROM Win32_ComputerSystem WHERE Name <> 'OR2660'
SELECT * FROM Win32_OperatingSystem WHERE Version like "10.%"

Computers with more than 4GB of memory:

Select * from WIN32_ComputerSystem where TotalPhysicalMemory >= 4200000000

Computers with a specific program installed:

Select * From Win32_Product where Name like "%7-Zip %"