Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

exchange 2013 log files

Posted on 2014-07-16
9
Medium Priority
?
2,757 Views
Last Modified: 2014-07-21
I'm running exchange 2013 and on my OS drive, my C drive, I'm running out of space.
After doing some digging, I came across this folder that has like 15GB of files.

C:\inetpub\logs\LogFiles\W3SVC2

Are these files needed?  Can I delete them?  Can they be deleted on a monthly basis?
They look like IIS logs, so I'm trying to think why I would need them?
Do they provide assistance if let's say someone can't log in to OWA or something?

Thanks.
0
Comment
Question by:afacts
  • 5
  • 4
9 Comments
 

Author Comment

by:afacts
ID: 40200118
Also, how about this location, can they be safely deleted, perhaps anything older than 1 month?

C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Temp
0
 
LVL 20

Accepted Solution

by:
Peter Hutchison earned 2000 total points
ID: 40200145
Yes, any log file can be deleted in c:\inetpub\logs. Also, try running a script monthly to clear ouut old logs, say older than 30 days:

For example use and modify this script and schedule it to run every week or so:
http://community.spiceworks.com/scripts/show/884-iis-log-cleanup-script
0
 

Author Comment

by:afacts
ID: 40200321
I'll just create a batch file, because I've never worked with vbscript, and not sure exactly what to change in the script.
Thanks
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
LVL 20

Expert Comment

by:Peter Hutchison
ID: 40200733
Just change the following line from:
strFolderName = "C:\WINDOWS\system32\LogFiles"
to
strFolderName = "C:\inetpub\logs\LogFiles"
0
 

Author Comment

by:afacts
ID: 40200766
So that's it, there's nothing else in the script that needs changing?

Also, how do I run it?  Do I just use task scheduler to schedule the script to run?
Does this script actually delete anything older than 1 month, where can I make changes to the script in that regards?
0
 
LVL 20

Expert Comment

by:Peter Hutchison
ID: 40201384
Yes, just copy the file as a vbs file to a script folder on the server then set up a Scheduled Task and run it under a local administrator account which will have rights over the folder. If you want to change the number of days to keep, just change the following line:
Const MaxDays = 30
0
 

Author Comment

by:afacts
ID: 40202507
ok, got it, so if i double click on the file, it runs fine, and deletes the files, but when I schedule it using the task scheduler, it says it's running, but it's not, because it doesn't do anything for minutes.

If I double click on it, in a second, it deletes the files.

So how do I get the task scheduler to actually run the file?
0
 
LVL 20

Expert Comment

by:Peter Hutchison
ID: 40203970
A couple of things:
1. Make sure task is set to 'Run where user is logged on or not'
2. Make sure task is set to 'Run with highest privileges'
0
 

Author Closing Comment

by:afacts
ID: 40209515
Thanks Peter for your help.  Since that didn't work, I couldn't get the task scheduler to automatically start the script, I just used a batch file I had, modified it to my location and it does the job.

Thanks.
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

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

If you have come across a situation where you need to find some EDB mailbox recovery techniques, then here you will find the same. In this article, we will take you through three techniques using which you will be able to perform EDB recovery. You …
Among the most obnoxious of Exchange errors is error 1216 – Attached Database Mismatch error of the Jet Database Engine. When faced with this error, users may have to suffer from mailbox inaccessibility and in worst situations, permanent data loss.
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

571 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