Follow

Get Restart History

Name:

Get Restart History

Category:

Event Logs

Description: 

Shows all events in the target computer's System log that contain the words “Shutdown Type” or “crash”.

Required Software:

PowerShell

Command:

Write-Output "Examine logs for restarts $(Computer:TARGET)"

Get-WinEvent -ComputerName $(Computer:TARGET) -LogName System -MaxEvents 3000 -ErrorAction SilentlyContinue |
Where {
$_.Message -match "Shutdown Type" -or
$_.Message -match "crash" } |
Format-List -property TimeCreated, LogName, ProviderName, LevelDisplayName, ID, Message

More Info/Usage:

Get-WinEvent

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk