tags:

views:

40

answers:

1

Is there a way to retrieve the voltage being supplied to a computer in real time?

+1  A: 

You can use WMI to get some of that information. I used the WMI Code Creator to come up with this VB script which returns the Win32_Processor CurrentVoltage value. If you have a laptop, there is also some battery information available in WMI.

strComputer = "." 
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") 
Set colItems = objWMIService.ExecQuery( _
    "SELECT * FROM Win32_Processor",,48) 
For Each objItem in colItems 
    Wscript.Echo "-----------------------------------"
    Wscript.Echo "Win32_Processor instance"
    Wscript.Echo "-----------------------------------"
    Wscript.Echo "CurrentVoltage: " & objItem.CurrentVoltage
Next
Seth