Get the Last Boot Time Using PowerShell

Photo of author
By Jeff LeBlanc

A 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

1 thought on “Get the Last Boot Time Using PowerShell”

Leave a Comment