Link to home
Start Free TrialLog in
Avatar of WellingtonIS
WellingtonIS

asked on

WMI Filtering

I have a mix of XP and windows 7 machines in my domain.  I have a screensaver (the same) for both the XP machines and Windows 7 machines it's using generic accounts to log in - the same account for both windows 7 and XP.  Obviously the exe is different for both machines so I created a wmi filter for windows 7 and for XP  (this is the filter for windows 7 -  - Select * from Win32_operatingSystem where Verions Like "6.1%" and ProductType="1")
This is the filter for XP (select * from Win32_OperatingSystem where Version like "5.1.%").  This issue is some of my Windows 7 machines the policy is being denied it says False WMI filter for both XP and Windows 7.  Can this be corrected? Lastly this is a wireless machine.  I thought that was the issue however the machine is picking up the other GPO's.
Avatar of ienaxxx
ienaxxx
Flag of Italy image

try running a script like this:

On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("select * from Win32_OperatingSystem")
For Each objItem in colItems
	Wscript.echo objItem.Version
	Wscript.echo objItem.BuildNumber
Next

Open in new window


if nothing goes wrong there is no reason for your filter to fail.
Otherwise if, probably, you get some error, you can investigate on that and find your solution...

Probably you have some problems on WMI on those machines. Something like WMI services not started or stuff like that.

double check registries for WMI errors and investigate in that direction.

HTH
Avatar of Member_2_6515809
Member_2_6515809

Does running the group policy simulation give the expected results? And what do you see if you run
gpresult /H C:\gpresult.html
From an elevated command prompt to see the Group Policy results?
Avatar of WellingtonIS

ASKER

I ran the VBS script on machine returns the following:
Windows Script Host - 6.1.7601
Windows Script Host - 7601
I'm not sure where to go from here.  Also where are the entries for wmi in the registry?
When I ran Group Policy Results from GPM I got that error that the WRMS SSMYPICSWIN7 which is the GPO with the WMI filter was False WMI Filter it was denied. When I ran gpresult /H C:\gpresult.html its denied there too.
Can you post the gpresult.html file here please, or give us the full error text, as I don't recognize the error you've posted. A "false wmi filter" result just means the WMI Filter evaluated to false for the machine in question, rather than being an error in itself.
sure see attached... The GPO name is wrms ssmypicswin7
gpresult.html
ASKER CERTIFIED SOLUTION
Avatar of Member_2_6515809
Member_2_6515809

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
The Machine in question is a Windows 7 machine.  I have 2 Policies one for XP and one for Windows 7  however, the user accounts are the same because we use generic accounts so I used the WMI filter so distinguish between the XP machines and the Win 7 machines.  I thought that was the purpose of the WMI filter to distinguish between OS, hardware etc? Its working on some machines but not on all.
OK took your advice and changed my filter from 6.1 to just 6 and that seemed to work?  I'm not sure why considering it's a 32 bit windows 7 machine but I'll take it.
OK took your advice and changed my filter from 6.1 to just 6 and that seemed to work?  I'm not sure why considering it's a 32 bit windows 7 machine but I'll take it.