System Uptime
Returns the time elapsed since the last system boot.
Script
(Get-Date) - (Get-CimInstance Win32_OperatingSystem).LastBootUpTimeReturns a TimeSpan object showing days, hours, minutes, and seconds since the last reboot.
Last updated on