Home > other >  Error calling get-wmiobject for Win32_powerplan
Error calling get-wmiobject for Win32_powerplan

Time:01-24

I'm trying to return the Error Log Outuput

Not sure what could be going on or how to get better error logs. The official docs use this exact code snippet, so not sure what it should change to if it's wrong.

Potentially related to PowerShell call to Win32_PowerPlan showing invalid class error

CodePudding user response:

It would appear that, to retrieve the information you are seeking, PowerShell needs to be run in "elevated" mode (i.e., "Run as Administrator").

When doing so, I see the information as intended; however, when running 'normally' (even though I'm logged on with admin rights), I see the same error message that you have reported.

  •  Tags:  
  • Related