Delete old IIS logs

Unfortunately, the IIS web server does not offer the option of automatically deleting older log files, either by continuously writing log files to disk or by writing only one log file of a selectable size.

IIS

I have therefore created a small script that deletes the log files after a selectable period of time. The script is available for download:

Using a scheduled task, the script can be executed every week, for example, so that all logs older than 7 days are deleted. Especially with Exchange Client Access Servers, it makes sense to clean up the logs at some point so that the volume does not fill up.

By default, the IIS logs are located on the system drive; this path should be adjusted.

12 thoughts on “Alte IIS-Logs löschen”

  1. Moin, der Link, bzw. das in WordPress eingebettete Skript ist leider nicht mehr funktional.
    Könnten Sie das wieder online nehmen?
    DANKE

    Reply
  2. Danke Frank, es funktioniert ganz gut. Leider werden die u_extend – Logfiles immer größer. Diese werden dann täglich neu angelegt und füllen die Platte rasend voll. Wie kann ich den File schrumpfen lassen?

    Reply
  3. Wozu dient eigentlich IIS? Ich betreibe hier keinen Server, IIS ist aber dennoch aktiv. Kann ich IIS – ich bin „normaler“ Internetbenutzer – abschalten, entfernen / löschen?
    Wie lauten die IIS-Filenames, die man löschen kann, wenn ich hier keinen Server will?

    Vielen herzlichen Dank im voraus für Eure Antworten an dl1nad (bei) web (dot) de

    Josef

    Reply
  4. Hallo mf, ich habe eben den link ausgeführt und das Script richtig (?) und augenscheinlich vollständig heruntergezogen. Probier’s nochmal

    Reply

Leave a Comment