Knowledge Base Article

Simple PowerShell script to look for .aspx errors in the IIS logs

This simple script will parse all the IIS logs given as a command line argument for 500 errors (so you can investigate furhter) logged for aspx pages.

PS C:\inetpub\log\IISlogs> .\nat.ps1 *.log

DATE         USER                      URL                                            STATUS
=====================================================================
10/01/2012--NATHDOM\tooyoung--/EnterpriseVault/UploadItem.aspx--500
10/01/2012--NATHDOM\bFLANAGAN--/EnterpriseVault/ListArchives.aspx--501
10/01/2012--NATHDOM\rtnevoy--/EnterpriseVault/UploadItem.aspx--500
10/01/2012--NATHDOM\rmcrohan--/EnterpriseVault/UploadItem.aspx--500
DATE          USER                     URL                                            STATUS
=====================================================================
11/01/2012--NATHDOM\lonnor--/EnterpriseVault/SyncPoint.aspx--503
DATE         USER                      URL                                            STATUS
=====================================================================
12/01/2012--NATHDOM\priddles--/EnterpriseVault/ListArchives.aspx--500
12/01/2012--NATHDOM\arocki--/EnterpriseVault/ListArchives.aspx--502
12/01/2012--NATHDOM\Bobcoughlan--/EnterpriseVault/DownloadContent.aspx--500
12/01/2012--NATHDOM\Needavies--/EnterpriseVault/UploadItem.aspx--500

Note: The Microsoft Log Parser tool needs to be installed prior to running this script.

Published 13 years ago
Version 1.0

Was this article helpful?

No CommentsBe the first to comment