How can I know when my computer running Windows 7 was last restarted?
I prefer a solution that doesn't involve searching the event log, but something like
wmic or maybe
Or with the help of WMIC:
The main difference between Windows 7 and Windows XP that in Windows 7 Microsoft can show only last boot up time.
Also in Task Manager:
Or if you use Powershell, you can convert the time to something more readable that annoying WMI datetime format:
One other way to do this is to use the following command-line that works both in Windows XP and Windows 7:
It has the advantage of being faster than the
You can find more informations on the
Here is an example of the result (using a French copy of Windows 7 Pro SP1 x64, user-language doesn't matter much for the command-line):
(the computer name is purposely blurred)
More details on http://en.wikipedia.org/wiki/Uptime about the accuracy when determining system uptime.
This is an expansion to @m0nhawk's answer
In PowerShell you could do
Ridiculous how much code is needed for such a simple task
On Windows 7 I prefer
WMIC doesn't take into account sleep time, and I leave my workstation locked up at work sleeping during the week, ready to wake up the next day.