How to Get the Last Reboot Time Using PowerShell
To get the last reboot time with PowerShell, read LastBootUpTime from Win32_OperatingSystem. Subtract it from the current time to get the uptime: Output: Get-CimInstance returns a normal DateTime, so no conversion is needed. Below I show the shorter PowerShell 7 cmdlet, the reboot history from the event log, remote PCs and one Fast Startup catch. … Read more