Link to home
Start Free TrialLog in
Avatar of ranski
ranski

asked on

Group Policy Preferences & WMI Query (Help required)

Hi Experts,

I am having a few issues mapping drives and installing printers using Group Policy Preferences. In order to make sure that a user only maps drives and printers on a Client OS we are using WMI filters within Group Policy Preferences (using WMI outside of the policy within GPMC in not applicable). The below query doesn't appear to work on some systems even though when checking them over the query seems valid. The only difference we have found is that these systems appear to be windows 7 without SP1 installed.

select * from Win32_OperatingSystem Where NOT Caption like "%server%"

Can anyone provide a query that that will work with all Client OS systems that are not server? We do have some systems on windows XP, and windows 8. I understand the systems should all have SP1 installed but this is something we will fix in due course by another team.

thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of x-men
x-men
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of compdigit44
compdigit44

With Group Policy preferences you also have the ability to do "Item Level Targeting" this is something you may want to look into if you still run into problem with your WMI query.
To add to the canverstation you should not have to us WMI filtering if you using GPP to apply settings.  As compdigit44 mentioned you can use ILT (item level targeting) and would recommend it.

ILT allows you to use a single GPO to apply multiple settings to different groups.

http://www.windowsnetworking.com/articles_tutorials/Leveraging-Group-Policy-Preferences.html
Avatar of ranski

ASKER

Thanks all for your comments. Unfortunatly I have the exact same issue when using the SELECT * FROM Win32_OperatingSystem WHERE ProductType="1" query also.

I think it must be to do with machines on windows 7 only that do not have SP1.

Rather than bring all affected machines to SP1 in our business does anyone know of a LDAP query I could use to obtain the same result?

thanks
if you place all the machines with SP1 in a "SP1" OU...
Avatar of ranski

ASKER

Our organization is huge, sorry that's not an option
Are you applying the WMI query to the user config or computer config?
What if you tried this statement

Select * FROM Win32_OperatingSystem WHERE Version < '6.1.7601'

Open in new window

Avatar of ranski

ASKER

Hi, in group policy preferences targetting, user config side.
I thought you could not use GPP ILT because of your number of user.
Avatar of ranski

ASKER

No we can, i was talking about not using WMI in the main GPMC scope
Try this:
Under ILT:
New Item > Operating System > Product Drop Down : Windows 7 > Edition Drop Down : Select your edition > Release Drop Down :  No Service Pack Installed

That should handle your ILT for Windows 7 w/o SP1 installed
Avatar of ranski

ASKER

Thanks for your post but please read my first post. I want to target all workstation OS versions and not server. This has to work for all future versions also.
Have you tried ILT > New Item > WMI Query > ?
Use https://www.experts-exchange.com/questions/27924902/Group-Policy-Preferences-WMI-Query-Help-required.html?anchorAnswerId=38568121#a38568121 Statement, but instead of
SELECT * FROM Win32_OperatingSystem WHERE ProductType <> “1”

Open in new window


use
SELECT * FROM Win32_OperatingSystem WHERE ProductType = “3”

Open in new window

Avatar of ranski

ASKER

Hi, that would target server. It's not that the WMI statement is wrong, it's that it appears to fail on some systems. I've logged a call to Microsoft so thanks all but unfortuantly no one has really being able to help.
when you say some systems. Which ones are you talking about?