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?