Delete IIS Logs From Exchange Server 2013 Using PowerShell

This KB will show how to configure a PowerShell script that will go to the IIS directory and delete all the IIS log files.

First step is to copy the two lines below to a file and save it as .PS1

IISdelete.PS1

Remove-item c:\intetpub\logs\logfiles\w3svc1 –recurse

Remove-item c:\intetpub\logs\logfiles\w3svc2 –recurse

Next Step create a Schedule Task that will run the script every few days, weeks or months


Posted

in

,

by