0

I am running WMI queries remotely against a Windows Server 2012 box. I have two queries that are doing the same exact thing, one is just more efficient than the other.

Query 1:

Get-WmiObject Win32_Processor | Select NumberOfCores, Caption, MaxClockSpeed | Format-List

Query 2:

 Get-WmiObject -class Win32_Processor -Property NumberOfCores, Caption, MaxClockSpeed | Format-List NumberOfCores, Caption, MaxClockSpeed

For some reason, I get back an access denied error when I run the first query, but I don't when I run the second query. They both do the same thing when I run locally, though. Am I missing something?

eltaco431
  • 740
  • 2
  • 10
  • 24
  • I was just thinking if maybe this is due to the PowerShell version on my Windows Server? The first cmdlet works fine on one of my systems running v2.0 – eltaco431 Feb 02 '17 at 21:17
  • After some investigation, it is not the version of Powershell. I'm still not sure what the root cause is. – eltaco431 Feb 06 '17 at 16:20

0 Answers0