Created
September 23, 2023 14:00
-
-
Save rossarioking/091c01739001975442fea4f4da5e09b3 to your computer and use it in GitHub Desktop.
Monitoring Event Logs with Powershell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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