Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Time when Windows 7 was started/booted [closed]

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?

like image 695
Bhavik Ambani Avatar asked Nov 28 '22 07:11

Bhavik Ambani


2 Answers

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.

like image 192
grapeot Avatar answered Dec 09 '22 17:12

grapeot


it is possible in windows xp just type

systeminfo| find "System Up Time"

It will display system up time.

like image 38
Rais Alam Avatar answered Dec 09 '22 18:12

Rais Alam