Listing last reboots on Windows

If you need to list the last reboots on Windows, try the following Powershell script. It is similar to “last” on Linux/Unix systems:
Get-EventLog -LogName System |? {$_.EventID -in (6005,6006,6008,6009,1074,1076)} | ft TimeGenerated,EventId,Message -AutoSize –wrap

Here is a typical output:

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.