Skip to content

Latest commit

 

History

History
15 lines (8 loc) · 598 Bytes

boot_time.md

File metadata and controls

15 lines (8 loc) · 598 Bytes

Find last boot time

When did we last reboot this machine? What's the current uptime? How long since boot, since reboot, since last boot, since last reboot?

In powershell 2:

Get-WmiObject win32_operatingsystem | select csname, @{LABEL='LastBootUpTime';EXPRESSION={$_.ConverttoDateTime($_.lastbootuptime)}}

In Powershell 3+

Get-CimInstance -ClassName win32_operatingsystem | select csname, lastbootuptime

Source