Microsoft Exchange Server
TMA-EXCHANGE-2.1.2
Ensure 'Retain deleted items for the specified number of days' is set to '14'
Mô tả
This policy setting specifies how long deleted messages are retained before they are permanently removed from the database. Prints the number of mailbox databases whose DeletedItemRetention is less than 14 days (expected 0). Run on a Mailbox server (organization-wide objects are read from AD). Run from an Exchange Management Shell or after `Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn`; the audit loads the snap-in itself when Get-ExchangeServer is missing and fails if it cannot.
Cách kiểm tra
Phương pháp kiểm tra: Lệnh shell
$ErrorActionPreference = 'Stop'; if (-not (Get-Command Get-ExchangeServer -ErrorAction SilentlyContinue)) { Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn -ErrorAction Stop }; if (-not (Get-Command Get-ExchangeServer -ErrorAction SilentlyContinue)) { throw 'Exchange Management Shell cmdlets are not available' }; $ts = { param($v) $s = "$v"; if (-not $s -or $s -eq 'Unlimited') { $null } else { [timespan]$s } }; $bad = @(Get-MailboxDatabase -ErrorAction Stop | Where-Object { $t = & $ts $_.DeletedItemRetention; $null -eq $t -or $t.TotalDays -lt 14 }); $bad.Count- Đầu ra mong đợi
0
Cách khắc phục
Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng
Set-MailboxDatabase '<database>' -DeletedItemRetention 14
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- exchangemailboxretention
- Tham chiếu
- CIS Microsoft Exchange Server 2019 Benchmark v1.0.1 - 2.1.2 Ensure 'Retain deleted items for the specified number of days' is set to '14'
Kiểm tra máy này
Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.
tmaegis scan --target exchange