How To Get The Last Boot Time In Windows

Boot Time done four ways

There’s usually more than one way to do things in IT and getting the last boot time in Windows is no different.  Depending on OS Version, version of Powershell if installed, or if wmic is installed, will dictate the command to be used.

Below are four ways to get the last boot time on Windows. Two are via PowerShell and two via the Command Prompt.

Resource: How to Tell if PowerShell is Installed


Powershell command – current

The first Powershell command is for Powershell version 3.

Get-CimInstance -ClassName win32_operatingsystem | select csname, lastbootuptime

Powershell command – legacy

This second command is for Powershell versions 1 and 2.

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



Command Prompt – systeminfo

The third command is for Windows 7 or later command prompt.

systeminfo | find /i "Boot Time"

Command Prompt – wmic

The final command is a wmic command.

This wmic command is the same that is called in the second Powershell above but is called natively at the command prompt.

Wmic returns time in UTC.

Resource: Working with Dates and Times using WMI


wmic os get lastbootuptime

Scott Bollinger / kfalconspb /

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s