Skip to content

Latest commit

 

History

History

Clean-ExchangeLog

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Clean Exchange Service Logs

This script will clean and remove old Exchange Services Logs Not Database Logs .

The Script support the following parameters

  • JustCalculate: Get a summary of the total storage consumed by services logs (Exchange and IIS). [Switch]
  • SimulateDeleteLogs: Simulate Deletion, which writes a log that lists all files subject to removal. [Switch]
  • LogsOlderXDays: Only cleanup logs that are older than X number of days. [Int]
  • DeleteLogs: Delete the old logs and free disk space. [Switch]
  • ExtraFolderToAdd : Include additional folders, such as Temp or any other folders for cleaning during the cleanup process (.Logs and .ETL files only). [Array]

Read more here https://www.powershellcenter.com/2021/03/06/exchange-log-routation