Solved

GPO WMI Filter Based on Host Name

Posted on 2016-09-29
3
523 Views
Last Modified: 2016-10-09
Hi,

I need to set a WMI filter for a GPO based on any Computers that are WIN 7 OS and the Host Name starts with "GIC".

Kindly let me know how to set it up.

Thanks.
0
Comment
Question by:GulfIT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 28

Expert Comment

by:Michael Pfister
ID: 41821349
If I remember correctly you simply add 2 filters to the same GPO. It will perform an "AND" so only if both filter return true it will apply:

select * from Win32_OperatingSystem where  Version like '6.1.% '
select * from Win32_ComputerSystem where Caption like 'GIC%'   

Open in new window

0
 

Author Comment

by:GulfIT
ID: 41821358
Thanks,

Is there any way i can query a WMI filter and check results  prior to applying it to GPO ?
0
 
LVL 84

Accepted Solution

by:
oBdA earned 500 total points
ID: 41821419
Sorry, but the "Version" query above is not ideal - Server 2008 R2 will have the same version string (and there's a trailing space).
You can do it in a single WMI query, which is less expensive:
Select * From Win32_OperatingSystem Where (CSName like 'GCI%') And (Caption like '%Windows 7%')

Open in new window

To test a WMI filter in advance, you can use this tool, for example:
WMI Filter Validation Utility
https://sdmsoftware.com/gpoguy/free-tools/library/wmi-filter-validation-utility/
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article runs through the process of deploying a single EXE application selectively to a group of user.
This article shows the method of using the Resultant Set of Policy Tool to locate Group Policy that applies a particular setting.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question