Solved

Log on Exchange 2010

Posted on 2014-04-10
3
253 Views
Last Modified: 2014-04-25
Is it possible to clean the log (not the database log) on Exchange 2010 automatically as I see that there are many logs accumulated under C:\inetpub\logs\LogFiles\W3SVC1. Just wonder we can set the retention period for the log ...

Tks
0
Comment
Question by:AXISHK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 12

Expert Comment

by:Md. Mojahid
ID: 39993319
As per me your can't do that.
0
 
LVL 23

Accepted Solution

by:
Patrick Bogers earned 500 total points
ID: 39993421
Hi

W3SVC1 is most probable the logs for the default website in IIS. (where OWA lives)
You can easily write some simple powershell script which deletes entries older then x days.

Code would look like this and the job would be a scheduled task.

# Delete all Files in C:\inetpub\logs\LogFiles on yourservername older than 7 day(s)

$Path = "C:\inetpub\logs\LogFiles"
$Daysback = "-7"
$CurrentDate = Get-Date
$DatetoDelete = $CurrentDate.AddDays($Daysback)
Get-ChildItem $Path -Recurse | Where-Object { $_.LastWriteTime -lt $DatetoDelete } | Remove-Item
0
 

Author Closing Comment

by:AXISHK
ID: 40024002
tks
0

Featured Post

Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

739 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