1、设置环境变量:
- $ExchangeServerName = $env:ComputerName
-
- $ExchPath = $env:ExchangeInstallPath
-
- $ExchLogs = "Q:\ExchLogs"
-
- $IISLogs = "Q:\IISLogs"
-
- $DTLPath = "$ExchLogs\DiagnosticsLogs"
-
- $LoggingPath = "$ExchLogs\Logging"
-
- $TransportPath = "$ExchLogs\TransportRoles"
2、邮箱数据库的 Transaction Logs:
1)将邮箱数据库和日志文件放置在单独管理的文件夹或驱动器中。
Move-DatabasePath -Identity DB01 -EdbFilePath F:\DB01\DB01.edb -LogFolderPath F:\DB01_Logs
2)使用支持 Volume Shadow Copy(CSV)的备份软件定期清理 Transaction Logs。
3)如果在一段时间内,暂时不能使用备份软件清理 Transaction Logs,则启用 Circular Logging:
- Dismount-Database -Identity DB01
-
- Set-MailboxDatabase -Ide