Skip to content

Instantly share code, notes, and snippets.

@rossarioking
Created September 23, 2023 14:00
Show Gist options
  • Save rossarioking/091c01739001975442fea4f4da5e09b3 to your computer and use it in GitHub Desktop.
Save rossarioking/091c01739001975442fea4f4da5e09b3 to your computer and use it in GitHub Desktop.
Monitoring Event Logs with Powershell
Get-EventLog -LogName System -EntryType Error -After (Get-Date).AddHours(-1) | ForEach-Object {
Write-Host "Error Event Found: $($_.Message)"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment