Sunday, 21 June 2015

Powershell Script to get Event from Application Event Log

Powershell Script to get particual Event from Application Event Log



.You can use the below script to get Eventlog message using Powershell.

$Server='Your Computer Name"
$Yesterday="From Date in DD/MM/YYYY format"
$Today="To Date in DD/MM/YYYY format"
$Event = "Event ID you are looking for"
Get-EventLog -ComputerName $Server -LogName "Application" -after $Yesterday -before $Today| where {$_.EventID -eq $Event}

No comments:

Post a Comment