Using wbemtest that is a valid class on both operating systems?
Here is the full error:
PS C:\Windows\system32> Get-WmiObject -Namespace root\cimv2\power -Class win32_PowerSettingDataIndex
Get-WmiObject :
At line:1 char:1
Thats the first thing I checked. Using wbemtest the namespace is there. I am still digging but there is a change a group policy object may be preventing access to the namespace. Have you heard of anything like that?
Well, usually permissions problems would generate a more specific error.
Using Webemtest to check that the namespace or class exists isn’t really a valid test. A class exists whether there’s underlying components or not; Win32_TapeDrive exists, but I doubt you have tape drives attached. Have you tried querying any actual instances in Wbemtest?
It’s the error message I’m looking at. If the class merely didn’t exist, you’d get an entirely different error.
Can you query instances locally on one of the non-working machines? Can you query instances using Wbemtest? What about using Get-CimInstance, both locally and remote (requires WS-MAN to be enabled if you’re trying remotely)?
get-ciminstance works on windows 8 but also errors on my windows 7 boxes.
PS C:\Windows\system32> get-ciminstance -Namespace root\cimv2\power -ClassName win32_powersettingdataindex
get-ciminstance : This program is blocked by group policy. For more information, contact your system administrator.
At line:1 char:1
Using getrelated I was able to obtain the data I was looking for. There may have been ten better ways of doing this but I am enjoying becoming familiar with powershell.