Skip to content

Commit 45aecc1

Browse files
authored
Update Set-RetentionCompliancePolicy.md
adding examples for excluding deleted mailbox from Teams policy
1 parent 3dec277 commit 45aecc1

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

exchange/exchange-ps/exchange/Set-RetentionCompliancePolicy.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,36 @@ Set-RetentionCompliancePolicy -Identity "Sales Policy" -RemoveModernGroupLocatio
180180

181181
This example is similar to Example 2, except multiple deleted resources are specified.
182182

183+
### Example 5
184+
```powershell
185+
$stringJson = @"
186+
[{
187+
'EmailAddress': '[email protected]'
188+
}]
189+
"@
190+
191+
Set-RetentionCompliancePolicy -Identity "Teams Chat Retention Policy" -AddTeamsChatLocationException "[email protected]" -DeletedResources $stringJson
192+
```
193+
194+
The example excludes the specified deleted soft-deleted mailbox/mailuser from the mentioned Teams Retention Policy. You identify the deleted resources using the mailbox/mailuser email address.
195+
Policy exclusions must ensure that locations remain within the established limits: [Limits for Microsoft 365 retention policies and retention label policies | Microsoft Learn](https://learn.microsoft.com/purview/retention-limits#maximum-number-of-items-per-policy)
196+
197+
### Example 6
198+
```powershell
199+
$stringJson = @"
200+
[{
201+
'EmailAddress': '[email protected]'
202+
},
203+
{
204+
'EmailAddress': '[email protected]'
205+
}]
206+
"@
207+
208+
Set-RetentionCompliancePolicy -Identity "Teams Chat Retention Policy" -AddTeamsChatLocationException "[email protected]", "[email protected]" -DeletedResources $stringJson
209+
```
210+
211+
This example is similar to Example 5, except multiple deleted resources are specified.
212+
183213
## PARAMETERS
184214

185215
### -Identity

0 commit comments

Comments
 (0)