Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Look for events in System event log prior to the last boot to get clues as to why it rebooted
- ## Assume system has been used in the preceding 24 hours
- $boot = (gcim win32_operatingsystem).LastBootUpTime ; get-winEvent -FilterHashtable @{ LogName = 'System' ; EndTime = $boot ; StartTime = $boot.AddHours( -24 ) } -MaxEvents 50|select-object -property timecreated,Id,ProviderName,LevelDisplayName,Message
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement