use Disable-InMemoryTracing.ps1 to disable tracing of Exchange
other intersting scripts of exchange via Exchange 2013 Scripts on Server | DonnIgway.
use Disable-InMemoryTracing.ps1 to disable tracing of Exchange
other intersting scripts of exchange via Exchange 2013 Scripts on Server | DonnIgway.
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
}
remove Folder C:\Program Files\Microsoft\Exchange Server\V15\Logging\lodctr_backups after Installation of Exchange or an CU upgrade to free up disk space
Edit the Microsoft.Exchange.Diagnostics.Service.exe.config file in the bin folder by adding the following line in the appSettings area:
<add key=“MaxDailyPerformancelogDirectorySize“ value=“1024″/>
or lower <add key=“MaxDailyPerformancelogDirectorySize“ value=“512″/>
The value is the maximum space consumed for daily performance logs, in megabytes.
Then restart the MSExchangeDiagnostics service for the change to take effect.
forfiles /P C:\inetpub\logs /S /M *.log /C „cmd /c del @path“ /D -1
use with parameter in cmd
forfiles /P %1 /S /M %2 /C „cmd /c del @path“ /D %3
=logRollover.cmd „C:\inetpub\logs“ „*.log“ -1