Dan
asked on
exchange 2013 log files
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\W 3SVC2
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.
After doing some digging, I came across this folder that has like 15GB of files.
C:\inetpub\logs\LogFiles\W
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
Thanks
Just change the following line from:
strFolderName = "C:\WINDOWS\system32\LogFi les"
to
strFolderName = "C:\inetpub\logs\LogFiles"
strFolderName = "C:\WINDOWS\system32\LogFi
to
strFolderName = "C:\inetpub\logs\LogFiles"
ASKER
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?
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?
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
Const MaxDays = 30
ASKER
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?
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?
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'
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'
ASKER
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.
Thanks.
ASKER
C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\