|
| 1 | +When responding to investigations or audits, it's important to confirm whether mailbox content is being preserved and why. Microsoft Purview supports several types of holds that prevent mailbox content from being permanently deleted. This includes holds applied through eDiscovery cases, retention policies, retention labels, and litigation holds. |
| 2 | + |
| 3 | +## Identify mailbox hold types |
| 4 | + |
| 5 | +You can use Exchange Online PowerShell to identify the types of holds placed on a mailbox. |
| 6 | + |
| 7 | +Before you check hold status, it helps to understand what types of holds you might see: |
| 8 | + |
| 9 | +- **Litigation Hold** keeps mailbox content for legal reasons, even if the user deletes it. |
| 10 | +- **eDiscovery holds** are tied to eDiscovery cases and preserve content relevant to investigations. |
| 11 | +- **Retention policies** apply to entire mailboxes or groups of mailboxes based on organizational rules. |
| 12 | +- **Retention labels** apply to specific items or folders and can trigger preservation even without a policy. |
| 13 | +- **Delay holds** apply after a hold is removed, giving time before content is purged. |
| 14 | + |
| 15 | +You might see one or more of these on the same mailbox, depending on how your environment is configured. |
| 16 | + |
| 17 | +To check for Litigation Hold and unified holds (eDiscovery holds and retention policies): |
| 18 | + |
| 19 | +```powershell |
| 20 | +Get-Mailbox <username> | FL LitigationHoldEnabled,InPlaceHolds |
| 21 | +``` |
| 22 | + |
| 23 | +- **LitigationHoldEnabled** indicates whether a mailbox is on Litigation Hold. |
| 24 | +- **InPlaceHolds** contains GUIDs for other hold types. |
| 25 | + |
| 26 | +Hold GUIDs use different prefixes to indicate the type: |
| 27 | + |
| 28 | +- `UniH` = eDiscovery hold |
| 29 | +- `mbx`, `skp`, or `grp` = retention policy |
| 30 | +- `-mbx` = explicitly excluded from a retention policy |
| 31 | + |
| 32 | +If a GUID starts with `-mbx`, it means the mailbox has been explicitly excluded from an organization-wide policy. This can be used to prevent retention from applying to specific mailboxes, even when the policy is scoped broadly. |
| 33 | + |
| 34 | +If **InPlaceHolds** is empty, check for organization-wide retention policies: |
| 35 | + |
| 36 | +```powershell |
| 37 | +Get-OrganizationConfig | FL InPlaceHolds |
| 38 | +``` |
| 39 | + |
| 40 | +To check if content is preserved due to retention labels: |
| 41 | + |
| 42 | +```powershell |
| 43 | +Get-Mailbox <username> | FL ComplianceTagHoldApplied |
| 44 | +``` |
| 45 | + |
| 46 | +- If **ComplianceTagHoldApplied** is `True`, the mailbox is treated as on hold because a retention label that retains content has been applied to at least one item. |
| 47 | + |
| 48 | +To view delay hold status after a hold is removed: |
| 49 | + |
| 50 | +```powershell |
| 51 | +Get-Mailbox <username> | FL DelayHoldApplied,DelayReleaseHoldApplied |
| 52 | +``` |
| 53 | + |
| 54 | +These properties show whether a delay hold is in place, temporarily extending retention after the original hold is removed. |
| 55 | + |
| 56 | +## Match hold GUIDs to specific cases and policies |
| 57 | + |
| 58 | +After identifying hold GUIDs on a mailbox, you might need to trace those values back to a specific case, policy, or content location. |
| 59 | + |
| 60 | +### For eDiscovery holds |
| 61 | + |
| 62 | +eDiscovery hold GUIDs start with `UniH`. To match a GUID to a specific case and hold: |
| 63 | + |
| 64 | +1. Remove the `UniH` prefix. |
| 65 | +1. In Security & Compliance PowerShell, run: |
| 66 | + |
| 67 | + ```powershell |
| 68 | + $CaseHold = Get-CaseHoldPolicy <GUID without UniH> |
| 69 | + Get-ComplianceCase $CaseHold.CaseId | FL Name |
| 70 | + $CaseHold | FL Name,ExchangeLocation |
| 71 | + ``` |
| 72 | + |
| 73 | +These commands reveal the name of the eDiscovery case, the hold name, and the mailboxes under hold. |
| 74 | + |
| 75 | +### For retention policies |
| 76 | + |
| 77 | +Retention policy GUIDs often start with `mbx`, `skp`, or `grp`. To match a GUID to a Microsoft Purview retention policy: |
| 78 | + |
| 79 | +1. Remove the prefix and suffix (such as `:1`, `:2`, or `:3`). |
| 80 | +1. Run: |
| 81 | + |
| 82 | + ```powershell |
| 83 | + Get-RetentionCompliancePolicy <GUID without prefix or suffix> -DistributionDetail | FL Name,*Location |
| 84 | + ``` |
| 85 | + |
| 86 | +This shows the name of the retention policy and the content locations it's scoped to. |
| 87 | + |
| 88 | +Matching GUIDs to holds can help verify why a mailbox is preserved, confirm scope, and support defensible investigations. |
| 89 | + |
| 90 | +## Use a script to report on eDiscovery holds |
| 91 | + |
| 92 | +While PowerShell can help you check individual mailbox holds, Microsoft also provides a sample script to generate a report of all eDiscovery case holds across your organization. |
| 93 | + |
| 94 | +Use this script during audits or investigations to: |
| 95 | + |
| 96 | +- Show which cases have active holds |
| 97 | +- See who created or modified the holds |
| 98 | +- List the content locations in scope |
| 99 | +- Identify cases that don’t include any holds |
| 100 | + |
| 101 | +It also creates a separate report listing eDiscovery cases that have **no holds**. |
| 102 | + |
| 103 | +### What the script collects |
| 104 | + |
| 105 | +When you run the script, it generates two CSV files: |
| 106 | + |
| 107 | +- `CaseHoldsReport_<timestamp>.csv` with details about each hold, including: |
| 108 | + |
| 109 | + - Case name, type, and status |
| 110 | + - Hold name and whether it's enabled |
| 111 | + - Hold creator and last modifier |
| 112 | + - Query-based syntax, if applicable |
| 113 | + - Mailboxes and SharePoint sites in scope |
| 114 | + - Hold creation and modification timestamps |
| 115 | +- `CasesWithNoHolds_<timestamp>.csv`, which lists any eDiscovery cases that don't have associated holds |
| 116 | + |
| 117 | +### How to run the script |
| 118 | + |
| 119 | +1. Connect to [Security & Compliance PowerShell](/powershell/exchange/connect-to-scc-powershell). |
| 120 | + |
| 121 | +1. Create a new `.ps1` script file in a text editor and paste in the script provided in the [official documentation](/purview/edisc-hold-report-script#step-2-run-the-script-to-report-on-holds-associated-with-ediscovery-cases). Save the file as `CaseHoldsReport.ps1`. |
| 122 | + |
| 123 | +1. In your PowerShell session, run the script: |
| 124 | + |
| 125 | + ```powershell |
| 126 | + .\CaseHoldsReport.ps1 |
| 127 | + ``` |
| 128 | + |
| 129 | +1. When prompted, enter a folder path where the reports will be saved. |
| 130 | + |
| 131 | +> [!TIP] |
| 132 | +> To save the report in the same folder as the script, type a period (`.`) when prompted. To use a subfolder, type the subfolder name. |
| 133 | +
|
| 134 | +Once the script completes, you'll see confirmation in the PowerShell window and can open the CSV files from the path you specified. |
| 135 | + |
| 136 | +Using this report can help you quickly validate whether content is under legal hold and identify any gaps, especially during time-sensitive investigations. |
0 commit comments