Last active
December 19, 2015 09:59
-
-
Save sri-prasanna/5936616 to your computer and use it in GitHub Desktop.
A collection of powershell scripts that I create..
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
#script to list all eventlog entries with a specific text in the description | |
$regex_to_match=".*RoutingExtensions.*" | |
Get-EventLog -LogName "Application" | Where-Object {$_.Message -match $regex_to_match} | format-list -Property Source,EntryType,Message,TimeWritten | |
#filter eventlog entries based on date and regular expression | |
$regex_to_match=".*DfpLibrary.*" | |
$dateVal = (get-date 2013-07-01) | |
Get-EventLog -LogName "Application" | Where-Object {$_.Message -match $regex_to_match -and $_.TimeWritten -gt $dateVal} | format-list -Property Source,EntryType,Message,TimeWritten | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment