Solved

Log on Exchange 2010

Posted on 2014-04-10
3
246 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
3 Comments
 
LVL 12

Expert Comment

by:Md. Mojahid
Comment Utility
As per me your can't do that.
0
 
LVL 19

Accepted Solution

by:
Patricksr1972 earned 500 total points
Comment Utility
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
Comment Utility
tks
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
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…
In this video we show how to create a mailbox database 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 Servers >> Data…

771 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

16 Experts available now in Live!

Get 1:1 Help Now