Windows – Application logs in windows 2008 is showing empty

windowswindows-server-2008windows-server-2008-r2

Application logs in windows 2008 is showing zero event.

Issue is re-occurring, all others logs are showing events but application logs in eventvwr is showing empty.

Tried to access application logs from powershell and getting below error:

PS Y:> get-eventlog application
Get-EventLog : The file size exceeds the limit allowed and cannot be saved
At line:1 char:13
+ get-eventlog <<<< application
+ CategoryInfo : NotSpecified: (:) [Get-EventLog], Win32Exception
+ FullyQualifiedErrorId : System.ComponentModel.Win32Exception,Microsoft.PowerShell.Commands.GetEventLogCommand

Issue gets resolved after renaming application log file but re-occur again.

Checked and found size limit is 262144 KB however application log file only of 66560 KB

Best Answer

you can access the eventlog with Get-Eventlog but i think you need to specify more things

$Events = Get-Eventlog -LogName application -Entrytype Error -Newest 200

This example will only list the Error Events of the newest 200 events in application log

$Events | format-list *

will show you all properties.

To the problem with Eventlog showing no entries try to rename the log file as it was answered here: Can not see entries in Application Log in Event Viewer