Solved

GPO WMI Filter Based on Host Name

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

As network administrators; we know how hard it is to track user’s login/logout using security event log (BTW it is harder now in windows 2008 because user name is always “N/A” in the grid), and most of us either get 3rd party tools, or just make our…
Do you have users whose passwords are expiring and they are constantly calling you?  Well I sure did and needed a way to put an end to this.  We have a lot of remote users which would not be notified that their passwords were expiring since they wer…
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…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

708 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

13 Experts available now in Live!

Get 1:1 Help Now