Solved

GPO WMI Filter Based on Host Name

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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

[b]Ok so now I will show you how to add a user name to the description at login. [/b] First connect to your DC (Domain Controller / Active Directory Server) SET PERMISSIONS FOR SCRIPT TO UPDATE COMPUTER DESCRIPTION TO USERNAME 1. Open Active …
This article explains the steps required to use the default Photos screensaver to display branding/corporate images
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 to another domain controller. Log onto the new domain controller with a user account t…
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.

840 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