Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

GPO WMI Filter Based on Host Name

Posted on 2016-09-29
3
Medium Priority
?
1,240 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 29

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 85

Accepted Solution

by:
oBdA earned 2000 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

A hard and fast method for reducing Active Directory Administrators members.
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

718 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