Hello
I want to write agent procedure that can set the IIS W3SVC1 log period to 2 weeks.
thanks
siavashsajadi , We just run a script to delete all the logs that are over 60 days old using a FORFILES command.
[Code]FORFILES /p d:\inetpub\logs\W3SVC1 /s /m *.log /d -60 /c "CMD /C del /Q @FILE"[/Code]
You would need to update it with the location of your logs files, and change the "60" to "14" days if you only wanted 2 weeks. We have multiple Kservers so we are able to script it, but you could probably setup a scheduled task to do it every week.
IIS doesn't have built in logfile management. It just makes a new log every day, forever. So, There is no 'setting' for Kaseya to set or adjust. You must use a separate third-party tool to delete unwanted old IIS logs.
I use a 'universal' VBS script we developed to do the log file cleaning, but you could use www.erezbenari.com/.../iislogcleaner.html and build an agent procedure around that.
@Chris Amori,
We use the same script (cmd)... works fine..