System.Management.ManagementException
HResult=0x80131501
Message=This method is not implemented in any class
Source=System.Management
StackTrace:
at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementObject.InvokeMethod(String methodName, ManagementBaseObject inParameters, InvokeMethodOptions options)
at GetCurrentPowerPlan.ROOT.CIMV2.POWER.Win32.Powerplan.Activate() in C:\Users\j0sha\source\repos\GetCurrentPowerPlan\GetCurrentPowerPlan\Powerplan.vb:line 425
at GetCurrentPowerPlan.Form1.Button1_Click(Object sender, EventArgs e) in C:\Users\j0sha\source\repos\GetCurrentPowerPlan\GetCurrentPowerPlan\Form1.vb:line 11
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at GetCurrentPowerPlan.My.MyApplication.Main(String[] Args) in :line 81
This exception was originally thrown at this call stack:
System.Management.ManagementException.ThrowWithExtendedInfo(System.Management.ManagementStatus)
System.Management.ManagementObject.InvokeMethod(string, System.Management.ManagementBaseObject, System.Management.InvokeMethodOptions)
GetCurrentPowerPlan.ROOT.CIMV2.POWER.Win32.Powerplan.Activate() in Powerplan.vb
GetCurrentPowerPlan.Form1.Button1_Click(Object, System.EventArgs) in Form1.vb
System.Windows.Forms.Control.OnClick(System.EventArgs)
System.Windows.Forms.Button.OnClick(System.EventArgs)
System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs)
System.Windows.Forms.Control.WmMouseUp(ref System.Windows.Forms.Message, System.Windows.Forms.MouseButtons, int)
System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message)
System.Windows.Forms.ButtonBase.WndProc(ref System.Windows.Forms.Message)
...
[Call Stack Truncated]