Solved

Exchange 2013 and IIS Logs filling up Hard disk space

Posted on 2016-10-10
6
55 Views
Last Modified: 2016-10-11
So recently we ran into a problem on our exchange environment. The "logging" folder in the exchange server is filling up about 30GB of space, and the same goes for the IIS logs folder also about 30GB and this caused our exchange server to stop receiving mail. This appears to have started since the latest Exchange 2013 CU that we applied.

Is there anyway to cut down or have it clear out logs after they are X days old with out messing up exchange?
0
Comment
Question by:Crossroads305
6 Comments
 
LVL 15

Accepted Solution

by:
Ivan earned 252 total points
ID: 41836718
Hi,

you can configure task, to delete logs older then XX days. I am using this method.
Save as VBScript, and run as task.

Change log folder path (if you are not using default), and change iMaxAge (to delete log older then 30 days, in this case).

sLogFolder = "c:\inetpub\logs\LogFiles"
iMaxAge = 30   'in days
Set objFSO = CreateObject("Scripting.FileSystemObject")
set colFolder = objFSO.GetFolder(sLogFolder)
For Each colSubfolder in colFolder.SubFolders
        Set objFolder = objFSO.GetFolder(colSubfolder.Path)
        Set colFiles = objFolder.Files
        For Each objFile in colFiles
                iFileAge = now-objFile.DateCreated
                if iFileAge > (iMaxAge+1)  then
                        objFSO.deletefile objFile, True
                end if
        Next
Next

Helpful link: http://www.iis.net/learn/manage/provisioning-and-managing-iis/managing-iis-log-file-storage

Regards,
Ivan.
0
 
LVL 49

Assisted Solution

by:Akhater
Akhater earned 62 total points
ID: 41836721
0
 
LVL 17

Assisted Solution

by:Gaurav Singh
Gaurav Singh earned 62 total points
ID: 41836722
you can schedule  the script to clear the logs . For IIS Refer

https://www.iis.net/learn/manage/provisioning-and-managing-iis/managing-iis-log-file-storage

About exchange can you please let us know what folder it is?
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 14

Assisted Solution

by:Todd Nelson
Todd Nelson earned 62 total points
ID: 41836801
Most logs in Exchange have a lifetime between 7 to 30 days.  This is common beginning with Exchange 2013, not with a specific CU.  Is it possible that coincidentally you had an increase in traffic or something else is or has recently occurred to that server>

If you have available space on another disk, you can move the logs from the default of C (if that's where they reside currently) ... http://social.technet.microsoft.com/wiki/contents/articles/22479.move-logging-in-exchange-2013-via-powershell.aspx

If you are just looking to remove log files, refer to this reference article ... https://oddytee.wordpress.com/2014/09/11/references-remove-exchange-2013-diagnostic-log-files/
0
 
LVL 63

Assisted Solution

by:Simon Butler (Sembee)
Simon Butler (Sembee) earned 62 total points
ID: 41837058
IIS logs just build and logging is enabled by default.
I recently cleared over 300gb of logs from a server - they hadn't been deleted since 2011.

If you don't want logging on IIS, then disable it within IIS manager.

The installation of the cumulative update would have nothing to do with the increase in logs.
0
 
LVL 1

Author Comment

by:Crossroads305
ID: 41838782
Thanks for all the help, Maybe it's just a coincident. a bunch of people got iPhones as of late here as well and I saw some articles talking about them causing excessive logging problems. I'll put some of these solutions in place and see if it helps.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
how to add IIS SMTP to handle application/Scanner relays into office 365.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now