Solved

GPO WMI Filter Based on Host Name

Posted on 2016-09-29
3
104 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
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 83

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Installing a printer using group policy preferences is not that hard let’s take a look at it. First lets open up your group policy console and edit the policy you want to add it to. I recommend creating a new policy for each printer makes it a l…
Mapping Drives using Group policy preferences Are you still using old scripts to map your network drives if so this article will show you how to get away for old scripts and move toward Group Policy Preference for mapping them. First things f…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

920 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now