How can I determine how long my Windows 8.1 PC has been up and running? Checking in task manager or using systeminfo command does not work, because they do not reset when you hibernate. I need to know the time my PC is turned on, not when the last boot from a real shutdown was.
Asked
Active
Viewed 4,128 times
2 Answers
8
I created for you a custom event filter which lists events when the computer was powered on or returned from hibernate or standby. Open Event Viewer, click 'Create Custom View' and set the same as below to recreate it:

Here's an example of its output:

The 'Dhcp-client' source event is an actual full boot start-up, the others are returns from standby or hibernate.
It should also be possible to extract this data by command line, but I'm not clear if this is what you wanted.
gogoud
- 1,436
5
Using PowerShell:
Get-WinEvent -MaxEvents 1 -FilterHashTable @{ProviderName='Microsoft-Windows-Power-Troubleshooter';LogName='System';ID='1'}
will output something like:
ProviderName: Microsoft-Windows-Power-Troubleshooter
TimeCreated Id LevelDisplayName Message
2023/01/26 09:07:14 1 Information The system has returned from a low power state....
Sam Hasler
- 143