Skip to content

Commit d79c9e6

Browse files
authored
User Story 4385249: Adding DeletedResources
1 parent ff7be60 commit d79c9e6

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

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

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Set-RetentionCompliancePolicy [-Identity] <PolicyIdParameter>
4949
[-Applications <MultiValuedProperty>]
5050
[-Comment <String>]
5151
[-Confirm]
52+
[-DeletedResources <String>]
5253
[-Enabled <Boolean>]
5354
[-EnforceSimulationPolicy <Boolean>]
5455
[-Force]
@@ -574,6 +575,58 @@ Accept pipeline input: False
574575
Accept wildcard characters: False
575576
```
576577

578+
### -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.
580+
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+
592+
#### Examples
593+
To remove deleted modern group (and site) from policy with explicit location:
594+
```powershell
595+
Set-RetentionCompliancePolicy -Identity "testModernGroupWithSiteId" -RemoveModernGroupLocation "[email protected]" -DeletedResources $stringJson
596+
```
597+
To exclude deleted modern group (and site) from a tenant level policy:
598+
```powershell
599+
Set-RetentionCompliancePolicy -Identity "testModernGroupWithSiteId" -AddModernGroupLocationException "[email protected]" -DeletedResources $stringJson
600+
```
601+
602+
You can enter multiple deleted resources at once separated by commas.
603+
```powershell
604+
$stringJson = @"
605+
[{
606+
'EmailAddress': '[email protected]',
607+
'SiteId': '9b1a7116-b9ec-4e2c-bf31-4ebb83697c4b'
608+
},
609+
[{
610+
'EmailAddress': '[email protected]',
611+
'SiteId': '4nfa7116-b9ec-4e2c-bf31-4ebb83697c4b'
612+
}]
613+
"@
614+
```
615+
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).
616+
617+
```yaml
618+
Type: String
619+
Parameter Sets: Identity
620+
Aliases:
621+
Applicable: Security & Compliance
622+
623+
Required: False
624+
Position: Named
625+
Default value: None
626+
Accept pipeline input: False
627+
Accept wildcard characters: False
628+
```
629+
577630
### -Enabled
578631
The Enabled parameter specifies whether the policy is enabled. Valid values are:
579632

0 commit comments

Comments
 (0)