Wednesday, April 6, 2016

Find Last Reboot Time of Local or Remote Windows System

There are different ways to find the Uptime or Last boot time of a windows machine using Command Prompt or Power Shell or Task manager or etc. 

Using the Command prompt:  
We have use the systeminfo command to find the last boot time but it wil get us lot of other details which we are not interested in. So we have to use systeminfo in conjunction with the pipe operator (|) with the find command to search the just that particular (boot time) information. 

On Local Server: 
systeminfo | find "System Boot Time:"
systeminfo | find "System Up Time:"

On Remote Server:
systeminfo /S   | find "System Boot Time:"
systeminfo /S   | find "System Up Time:"

/S for specifying the Remote Server Name
/U for specifying the user name
/P for specifying the password

Sometime System Boot Time work but sometime System Up Time work.  Depending on how the Microsoft decides to change things. 



We can use systeminfo command from command prompt but it will get us lot of system related information as shown below. 
























Using the Task Manager: 
But not all windows give this information. The OS older than Windows Server 2008 don't show this info on task manager.


















Using the Event Viewer: 
To figure out when the Windows was last rebooted, Open up Event Viewer, go to the Windows Logs -> System log, and then filter by Event ID 6006, which indicates that the event log service was shut down. One of the last things that happens before a reboot. This technique won't help when there was a power outage, but we can filter by Event ID 6005 to see when the system was last turned on. Event Id 6005 shows shows when the event log service was started again.

Thanks, Hope it helps.

No comments:

Post a Comment