Exchange 2013 & 2016: System logs = Disk getting full

On Exchange 2013 and 2016, you can often see that the logging directory is growing, maybe too fast for your storage.

You can circumvent this, by implementing this script in task scheduler and running via Powershell:

gci ‘c:\Program Files\Microsoft\Exchange Server\V15\Logging’,’C:\inetpub\logs’ -Directory | gci -Include ‘*.log’,’*.blg’ -Recurse | ? LastWriteTime -lt (Get-Date).AddDays(-7) | Remove-Item

This one will delete all Exchange and IIS logs older than 7 days.

Source: https://social.technet.microsoft.com/Forums/exchange/en-US/5b9dd872-5803-4dae-83d1-584424b7bd94/exchange-2013-system-logs-disk-getting-full?forum=exchangesvradmin

 

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close