Read the log, out put the log

This one will work on a local machine to find an event ID and displays it on your screen
It looks in the application log for events for the last two days and ID = 9
 
$date = Get-Date -displayhint date
$d = ($date.AddDays(-2))
Get-EventLog -logname application | where {$_.timegenerated -gt $d -and $_.eventid -eq "9"}
 
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s