use forfiles (or something like that) for log rollover of Exchange Server to free up disk space – implement it for following folders
C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\Diagnostics\ETLTraces
C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\Diagnostics\Logs
C:\Program Files\Microsoft\Exchange Server\V15\Logging
C:\Program Files\Microsoft\Exchange Server\V15\Logging\Diagnostics\PerformanceLogsToBeProcessed
C:\Program Files\Microsoft\Exchange Server\V15\Logging\Monitoring\Monitoring\MSExchangeHMWorker\ActiveMonitoringTraceLogs
C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Temp
C:\inetpub\logs
exp: forfiles /p C:\inetpub\logs /m *.log /s /d -10 /c „cmd /c DEL @path“
alternativ with Powershell:
Function Remove-ToolsLog($olderThenDays){
Set-ToolsLogAddLine -LogTXT „Remove old log files“ -Foregroundcolor „green“
$logPath = Split-Path $Script:LogFilePath -Parent
Get-ChildItem -path $logPath | Where-Object { !$_.PSIsContainer -and $_.Extension -eq „.log“ -and $_.CreationTime -lt (Get-Date).AddDays(–$olderThenDays) } | Remove-Item -Force
}