Skip to content

Commit f9435d4

Browse files
committed
Update Set-RetentionCompliancePolicy.md
Fixed DeletedResources parameter addition.
1 parent 3d9b55f commit f9435d4

File tree

1 file changed

+62
-43
lines changed

1 file changed

+62
-43
lines changed

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

Lines changed: 62 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,6 @@ For information about the parameter sets in the Syntax section below, see [Excha
2222

2323
## SYNTAX
2424

25-
### RetryDistribution
26-
```
27-
Set-RetentionCompliancePolicy [-Identity] <PolicyIdParameter> [-RetryDistribution]
28-
[-Confirm]
29-
[-EnforceSimulationPolicy <Boolean>]
30-
[-StartSimulation <Boolean>]
31-
[-WhatIf]
32-
[<CommonParameters>]
33-
```
34-
3525
### Identity
3626
```
3727
Set-RetentionCompliancePolicy [-Identity] <PolicyIdParameter>
@@ -78,6 +68,7 @@ Set-RetentionCompliancePolicy [-Identity] <PolicyIdParameter> [-AddAdaptiveScope
7868
[-Applications <MultiValuedProperty>]
7969
[-Comment <String>]
8070
[-Confirm]
71+
[-DeletedResources <String>]
8172
[-Enabled <Boolean>]
8273
[-EnforceSimulationPolicy <Boolean>]
8374
[-Force]
@@ -87,6 +78,17 @@ Set-RetentionCompliancePolicy [-Identity] <PolicyIdParameter> [-AddAdaptiveScope
8778
[<CommonParameters>]
8879
```
8980

81+
### RetryDistribution
82+
```
83+
Set-RetentionCompliancePolicy [-Identity] <PolicyIdParameter> [-RetryDistribution]
84+
[-Confirm]
85+
[-DeletedResources <String>]
86+
[-EnforceSimulationPolicy <Boolean>]
87+
[-StartSimulation <Boolean>]
88+
[-WhatIf]
89+
[<CommonParameters>]
90+
```
91+
9092
### TeamLocation
9193
```
9294
Set-RetentionCompliancePolicy [-Identity] <PolicyIdParameter>
@@ -96,6 +98,7 @@ Set-RetentionCompliancePolicy [-Identity] <PolicyIdParameter>
9698
[-AddTeamsChatLocationException <MultiValuedProperty>]
9799
[-Comment <String>]
98100
[-Confirm]
101+
[-DeletedResources <String>]
99102
[-Enabled <Boolean>]
100103
[-EnforceSimulationPolicy <Boolean>]
101104
[-Force]
@@ -127,6 +130,52 @@ This example makes the following changes to the existing retention policy named
127130
- Removes public folders.
128131
- Updates the comment.
129132

133+
### Example 2
134+
```powershell
135+
$stringJson = @"
136+
[{
137+
'EmailAddress': '[email protected]',
138+
'SiteId': '9b2a8116-b9ec-4e2c-bf31-7eaa83697c4b'
139+
}]
140+
"@
141+
142+
Set-RetentionCompliancePolicy -Identity "Sales Policy" -RemoveModernGroupLocation "[email protected]" -DeletedResources $stringJson
143+
```
144+
145+
The example removes the specified deleted Microsoft 365 Group and site from the specified policy. You identify the deleted resources using the Microsoft 365 Group email address and the related site ID.
146+
147+
### Example 3
148+
```powershell
149+
$stringJson = @"
150+
[{
151+
'EmailAddress': '[email protected]',
152+
'SiteId': '8b2a8345-b9ec-3b6a-bf31-6eaa83697c4b'
153+
}]
154+
"@
155+
156+
Set-RetentionCompliancePolicy -Identity "Tenant Level Policy" -AddModernGroupLocationException "[email protected]" -DeletedResources $stringJson
157+
```
158+
159+
The example excludes the specified deleted Microsoft 365 Group and site from the specified tenant level policy. You identify the deleted resources using the Microsoft 365 Group email address and the related site ID.
160+
161+
### Example 4
162+
```powershell
163+
$stringJson = @"
164+
[{
165+
'EmailAddress': '[email protected]',
166+
'SiteId': '9b2a8116-b9ec-4e2c-bf31-7eaa83697c4b'
167+
},
168+
[{
169+
'EmailAddress': '[email protected]',
170+
'SiteId': '4afb7116-b9ec-4b2c-bf31-4abb83697c4b'
171+
}]
172+
"@
173+
174+
Set-RetentionCompliancePolicy -Identity "Sales Policy" -RemoveModernGroupLocation "[email protected]" -DeletedResources $stringJson
175+
```
176+
177+
This example is the same as Example 2, except multiple deleted resources are specified.
178+
130179
## PARAMETERS
131180

132181
### -Identity
@@ -576,41 +625,11 @@ Accept wildcard characters: False
576625
```
577626

578627
### -DeletedResources
579-
The DeletedResources parameter specifies the Sharepoint sites to be removed from the list of included sites or excluded from a tenant level policy when the associated group has been deleted. It is used in conjunction with AddModernGroupLocationException and RemoveModernGroupLocation. Valid value is a JSON String.
628+
The DeletedResources parameter specifies the Sharepoint sites to be removed from the list of included sites or excluded from a tenant level policy when the associated group has been deleted. You use this parameter with the AddModernGroupLocationException and RemoveModernGroupLocation parameters.
580629

581-
To specify a deleted resource, you must use the Modern Group mailbox address and the site ID. For example:
582-
583-
```powershell
584-
$stringJson = @"
585-
[{
586-
'EmailAddress': '[email protected]',
587-
'SiteId': '9b1a7116-b9ec-4e2c-bf31-4ebb83697c4b'
588-
}]
589-
"@
590-
```
591-
To remove deleted modern group (and site) from policy with explicit location:
592-
```powershell
593-
Set-RetentionCompliancePolicy -Identity "testModernGroupWithSiteId" -RemoveModernGroupLocation "[email protected]" -DeletedResources $stringJson
594-
```
595-
To exclude deleted modern group (and site) from a tenant level policy:
596-
```powershell
597-
Set-RetentionCompliancePolicy -Identity "testModernGroupWithSiteId" -AddModernGroupLocationException "[email protected]" -DeletedResources $stringJson
598-
```
630+
A valid value is a JSON String. See the Examples section for syntax an examples using this parameter.
599631

600-
You can enter multiple deleted resources at once separated by commas.
601-
```powershell
602-
$stringJson = @"
603-
[{
604-
'EmailAddress': '[email protected]',
605-
'SiteId': '9b1a7116-b9ec-4e2c-bf31-4ebb83697c4b'
606-
},
607-
[{
608-
'EmailAddress': '[email protected]',
609-
'SiteId': '4nfa7116-b9ec-4e2c-bf31-4ebb83697c4b'
610-
}]
611-
"@
612-
```
613-
For more information about this scenario, see [Learn more about modern group deletion under retention hold](https://learn.microsoft.com/en-us/purview/retention-settings#what-happens-if-a-microsoft-365-group-is-deleted-after-a-policy-is-applied).
632+
For more information about this scenario, see [Learn more about modern group deletion under retention hold](https://learn.microsoft.com/purview/retention-settings#what-happens-if-a-microsoft-365-group-is-deleted-after-a-policy-is-applied).
614633

615634
```yaml
616635
Type: String

0 commit comments

Comments
 (0)