Understanding when your machine was rebooted may assist you in troubleshooting better in case of any Abrupt shutdown or System Crash and in many other scenarios. You can achieve this with the following ways :
1. Use the Uptime utility in cmd prompt. Download it from this Link , extract and copy the uptime.exe to C:\Windows\System32 folder
CMD > type ‘uptime’ and hit Enter.
You can use \S Switch with uptime command to list all boot and shutdown events.
2. Go to Network Settings > Right click on the server NIC > Status .
You will see a clock running, this is clock gets reset every time machine reboots.
3. Use WMI query to know the last reboot time, Type in the below commmand in cmd Prompt.
Wmic os get lastbootuptime
4. Also, you can WMI query using Powershell with code below.
$wmio = Get-WmiObject win32_operatingsystem -ComputerName '127.0.0.1' $LocalTime = [management.managementDateTimeConverter]::ToDateTime($wmio.localdatetime) $LastBootUptime = [management.managementDateTimeConverter]::ToDateTime($wmio.lastbootuptime) $timespan = $localTime - $lastBootUptime $timespan
5. By using System Information Utility, type in the below command.
Systeminfo | find “System Boot Time”
Please note that, the string after Find in the ” ” (Double Quotes) is Case Sensitive
6. Using the Net Statistics command like below
Net statistics workstation
7. Using the Task Manager, Right-click on the Taskbar, and click Task Manager. You can also click CTRL+SHIFT+ESC to get to the Task Manager.
In Task Manager, select the Performance tab > The current system uptime is shown under System.
8. An obviously you can use Event Viewer to find the Uptime and last reboot information, follow my article on this Link
Hope This was useful, please share if you are aware of any other way to know Uptime of a machine.
Happy Learning ! 🙂
Related posts
5 Comments
Leave a Reply to BrianCancel reply
Categories
Author of Books
Awards
Open Sourced Projects
Author at
Blog Roll
Mike F RobbinsDamien Van Robaeys
Stéphane van Gulick
Kevin Marquette
Adam Bertram
Stephanos Constantinou
Francois-Xavier Cat
Ravikanth Chaganti
Roman Levchenko
Blog Stats
- 1,133,055 People Reached
[…] ~ For more detailed ways to track uptime of a machine follow this Link . […]
Thanks for sharing , very informative
Welcome 🙂
You can also use the GetUptime module from the PSGallery.
https://www.powershellgallery.com/packages/GetUptime/1.7
Noted thanks, I’ll update the content!