Skip to content

Commit 07e13af

Browse files
authored
Merge pull request #11776 from joagarwal/patch-1
User Story 4385249: Adding DeletedResources
2 parents 0bf6574 + b1e4095 commit 07e13af

File tree

1 file changed

+80
-10
lines changed

1 file changed

+80
-10
lines changed

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

Lines changed: 80 additions & 10 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>
@@ -49,6 +39,7 @@ Set-RetentionCompliancePolicy [-Identity] <PolicyIdParameter>
4939
[-Applications <MultiValuedProperty>]
5040
[-Comment <String>]
5141
[-Confirm]
42+
[-DeletedResources <String>]
5243
[-Enabled <Boolean>]
5344
[-EnforceSimulationPolicy <Boolean>]
5445
[-Force]
@@ -77,6 +68,7 @@ Set-RetentionCompliancePolicy [-Identity] <PolicyIdParameter> [-AddAdaptiveScope
7768
[-Applications <MultiValuedProperty>]
7869
[-Comment <String>]
7970
[-Confirm]
71+
[-DeletedResources <String>]
8072
[-Enabled <Boolean>]
8173
[-EnforceSimulationPolicy <Boolean>]
8274
[-Force]
@@ -86,6 +78,17 @@ Set-RetentionCompliancePolicy [-Identity] <PolicyIdParameter> [-AddAdaptiveScope
8678
[<CommonParameters>]
8779
```
8880

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+
8992
### TeamLocation
9093
```
9194
Set-RetentionCompliancePolicy [-Identity] <PolicyIdParameter>
@@ -95,6 +98,7 @@ Set-RetentionCompliancePolicy [-Identity] <PolicyIdParameter>
9598
[-AddTeamsChatLocationException <MultiValuedProperty>]
9699
[-Comment <String>]
97100
[-Confirm]
101+
[-DeletedResources <String>]
98102
[-Enabled <Boolean>]
99103
[-EnforceSimulationPolicy <Boolean>]
100104
[-Force]
@@ -126,6 +130,52 @@ This example makes the following changes to the existing retention policy named
126130
- Removes public folders.
127131
- Updates the comment.
128132

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 similar to Example 2, except multiple deleted resources are specified.
178+
129179
## PARAMETERS
130180

131181
### -Identity
@@ -574,6 +624,26 @@ Accept pipeline input: False
574624
Accept wildcard characters: False
575625
```
576626

627+
### -DeletedResources
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.
629+
630+
A valid value is a JSON String. See the Examples section for syntax and examples using this parameter.
631+
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).
633+
634+
```yaml
635+
Type: String
636+
Parameter Sets: Identity
637+
Aliases:
638+
Applicable: Security & Compliance
639+
640+
Required: False
641+
Position: Named
642+
Default value: None
643+
Accept pipeline input: False
644+
Accept wildcard characters: False
645+
```
646+
577647
### -Enabled
578648
The Enabled parameter specifies whether the policy is enabled. Valid values are:
579649

0 commit comments

Comments
 (0)