2

From the command line, how do I find when the last time a Windows 7 computer has been restarted?

CharlieRB
  • 23,021
  • 6
  • 60
  • 107

3 Answers3

3

Open a Command Prompt by going to Start and opening “cmd”. You will then be presented with a command prompt window, where you need to type the systeminfo command below:

C:\> systeminfo | find "Boot"
System Boot Time:          05/06/2013, 12:55:07
Bob Stein
  • 1,483
TomEus
  • 3,793
0
tasklist /v | find "Idle"

On Windows 7, tasklist will output something (ugly and wrapped) such as:

System Idle Process              0 Services                   0         24 K Unk
nown         NT AUTHORITY\SYSTEM                                   449:12:23 N/A

Which in this case means 449 hours (almost 20 days) of system-idle since the last reboot. Of course, this is a rough approximation of time since reboot; it doesn't include actual useful CPU-time.

Bob Stein
  • 1,483
0

Use

net statistics workstation | find "Statistics since"

or

net statistics server      | find "Statistics since"

These commands can be abbreviated  “net stats work”  or  “net stats srv”.