Time when Windows 7 was started/booted

Bhavik Ambani picture Bhavik Ambani · Jan 22, 2012 · Viewed 11.1k times · Source

I want to check the operating system's start time. That is, for the last one month, the times when Windows was booted up. Is it possible to find this out?

Answer

grapeot picture grapeot · Jan 22, 2012

PowerShell and System Event Log are perfectly designed for this task. Note events with id 12 is a System Start Up event while an id 13 indicates System Shutdown. The following PowerShell script will provide the start and shutdown time of your system in one month.

echo "Start time:"
Get-EventLog System -After 12/21/2011 | ? {$_.EventId -eq 12} | % {$_.TimeGenerated}
echo "Shutdown time:"
Get-EventLog System -After 12/21/2011 | ? {$_.EventId -eq 13} | % {$_.TimeGenerated}

Substitute the 12/21/2011 to any date you wish. Click Start Menu, type "powershell" and then enter will launch Windows PowerShell.