search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
How to get Application Event Logs via PowerShell
Posted in Windows Powershell | No Comment | 1,439 views | 28/05/2015 10:51

Following script will get Application Logs in last hour with “vmic*” source logs.

1
2
3
4
5
6
7
8
9
# Application Log Parameters
$ApplicationLogParameters = @{
LogName= "Application"
EntryType= "Error","Warning"
After= (Get-Date).AddHours(-1)
}
 
# Get Application Logs
Get-EventLog @ApplicationLogParameters -Source vmic*

You can set scope by changing EntryType parameter.



Leave a Reply