Get the Last Boot Time Using PowerShell

Simple PS command to get a system’s LastBootUpTime using PowerShell.

# Local Computer
Get-CimInstance -Namespace root\cimv2 -ClassName Win32_OperatingSystem | Select LastBootUpTime

Use the following for getting LastBootUpTime for a remote system.

# Remote Computer
Get-CimInstance -ComputerName <systemName> -Namespace root\cimv2 -ClassName Win32_OperatingSystem | Select LastBootUpTime

Leave a Comment