6

On a Windows computer, is there a way to see the date and time when the computer was booted/turned on/powered on? Something like the Linux uptime command.

But I'd rather it display the exact time when it was turned on, not the time that has passed since then. For example if you turned it on today at 14:30, it would display something like 9/16/2016 14:30.

Franck Dernoncourt
  • 24,246
  • 64
  • 231
  • 400
sashoalm
  • 4,260

2 Answers2

7

Maybe have a look here. This is a fairly long article about the different methods.

Summary:

Interesting for you:

  • systeminfo (shows absolute time)

    systeminfo | findstr "System Boot Time:"

  • net statistics (shows absolute time)

    net statistics workstation

    or

    net statistics server

    depending on your computer's role

  • Powershell

    Get-WinEvent -ProviderName eventlog | Where-Object {$.Id -eq 6005 -or $.Id -eq 6006}

  • WMI

    wmic os get lastbootuptime

Not interesting for you:

  • Task Manager (shows the passed-since-then time)
  • Uptime utility (requires separate tool, shows passed-since-then time)

Credits go to the author of the quoted community wiki article.

stueja
  • 606
1

PowerShell 6.0 or higher:

Get-Uptime

Examples from the documentation:

Example 1 - Show time since last boot

    Get-Uptime
Days              : 9
Hours             : 0
Minutes           : 9
Seconds           : 45
Milliseconds      : 0
Ticks             : 7781850000000
TotalDays         : 9.00677083333333
TotalHours        : 216.1625
TotalMinutes      : 12969.75
TotalSeconds      : 778185
TotalMilliseconds : 778185000

Example 2 - Show the time of the last boot

    Get-Uptime -Since
Tuesday, June 18, 2019 2:34:56 PM

Franck Dernoncourt
  • 24,246
  • 64
  • 231
  • 400