Find Shutdown Events

By | 2022-07-08

Just a quick PowerShell one-liner to display all the shutdown events on a computer.

get-eventlog -LogName system | where eventid -in 41,1074,1076,6005,6006,6008,6009 | ft timegenerated,eventid,username,message -autosize -wrap

If you modify this slightly by adding the -computername switch, you can get the shutdown events for remote computers as well.

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

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