Skip to content

Commit 8ef916b

Browse files
authored
Merge pull request #13271 from rkMsf/add-compliance-hold-documentation
Add RemoveCompliaceTagHold documentation for Set-Mailbox and ExcludeFromAllHolds for Set-MailUser
2 parents db1dced + d5c2600 commit 8ef916b

File tree

2 files changed

+521
-22
lines changed

2 files changed

+521
-22
lines changed

exchange/exchange-ps/ExchangePowerShell/Set-MailUser.md

Lines changed: 156 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ For information about the parameter sets in the Syntax section below, see [Excha
2121

2222
## SYNTAX
2323

24-
### Default
24+
### Identity (Default)
2525
```
2626
Set-MailUser [-Identity] <MailUserIdParameter>
2727
[-AcceptMessagesOnlyFrom <MultiValuedProperty>]
@@ -149,6 +149,8 @@ Set-MailUser [-Identity] <MailUserIdParameter> [-EnableLitigationHoldForMigratio
149149
[-MailTip <String>]
150150
[-MailTipTranslations <MultiValuedProperty>]
151151
[-MailboxRegion <String>]
152+
[-MaxReceiveSize <MultiValuedProperty>]
153+
[-MaxSendSize <MultiValuedProperty>]
152154
[-MessageBodyFormat <MessageBodyFormat>]
153155
[-MessageFormat <MessageFormat>]
154156
[-MicrosoftOnlineServicesID <SmtpAddress>]
@@ -178,6 +180,80 @@ Set-MailUser [-Identity] <MailUserIdParameter> [-EnableLitigationHoldForMigratio
178180
[<CommonParameters>]
179181
```
180182

183+
### ExcludeFromAllHolds
184+
```
185+
Set-MailUser [-Identity] <MailUserIdParameter> [-ExcludeFromAllHolds]
186+
[-AcceptMessagesOnlyFrom <MultiValuedProperty>]
187+
[-AcceptMessagesOnlyFromDLMembers <MultiValuedProperty>]
188+
[-AcceptMessagesOnlyFromSendersOrMembers <MultiValuedProperty>]
189+
[-Alias <String>]
190+
[-ArchiveGuid <Guid>]
191+
[-BypassModerationFromSendersOrMembers <MultiValuedProperty>]
192+
[-Confirm]
193+
[-CustomAttribute1 <String>]
194+
[-CustomAttribute10 <String>]
195+
[-CustomAttribute11 <String>]
196+
[-CustomAttribute12 <String>]
197+
[-CustomAttribute13 <String>]
198+
[-CustomAttribute14 <String>]
199+
[-CustomAttribute15 <String>]
200+
[-CustomAttribute2 <String>]
201+
[-CustomAttribute3 <String>]
202+
[-CustomAttribute4 <String>]
203+
[-CustomAttribute5 <String>]
204+
[-CustomAttribute6 <String>]
205+
[-CustomAttribute7 <String>]
206+
[-CustomAttribute8 <String>]
207+
[-CustomAttribute9 <String>]
208+
[-DataEncryptionPolicy <DataEncryptionPolicyIdParameter>]
209+
[-DisplayName <String>]
210+
[-EmailAddresses <ProxyAddressCollection>]
211+
[-ExchangeGuid <Guid>]
212+
[-ExtensionCustomAttribute1 <MultiValuedProperty>]
213+
[-ExtensionCustomAttribute2 <MultiValuedProperty>]
214+
[-ExtensionCustomAttribute3 <MultiValuedProperty>]
215+
[-ExtensionCustomAttribute4 <MultiValuedProperty>]
216+
[-ExtensionCustomAttribute5 <MultiValuedProperty>]
217+
[-ExternalEmailAddress <ProxyAddress>]
218+
[-FederatedIdentity <String>]
219+
[-ForceUpgrade]
220+
[-GrantSendOnBehalfTo <MultiValuedProperty>]
221+
[-HiddenFromAddressListsEnabled <Boolean>]
222+
[-HVEAccount]
223+
[-ImmutableId <String>]
224+
[-JournalArchiveAddress <SmtpAddress>]
225+
[-MacAttachmentFormat <MacAttachmentFormat>]
226+
[-MailTip <String>]
227+
[-MailTipTranslations <MultiValuedProperty>]
228+
[-MailboxRegion <String>]
229+
[-MaxReceiveSize <MultiValuedProperty>]
230+
[-MaxSendSize <MultiValuedProperty>]
231+
[-MessageBodyFormat <MessageBodyFormat>]
232+
[-MessageFormat <MessageFormat>]
233+
[-MicrosoftOnlineServicesID <SmtpAddress>]
234+
[-ModeratedBy <MultiValuedProperty>]
235+
[-ModerationEnabled <Boolean>]
236+
[-Name <String>]
237+
[-Password <SecureString>]
238+
[-PrimarySmtpAddress <SmtpAddress>]
239+
[-RecipientLimits <MultiValuedProperty>]
240+
[-RejectMessagesFrom <MultiValuedProperty>]
241+
[-RejectMessagesFromDLMembers <MultiValuedProperty>]
242+
[-RejectMessagesFromSendersOrMembers <MultiValuedProperty>]
243+
[-RemoveMailboxProvisioningConstraint]
244+
[-RequireSenderAuthenticationEnabled <Boolean>]
245+
[-ResetPasswordOnNextLogon <Boolean>]
246+
[-SendModerationNotifications <TransportModerationNotificationFlags>]
247+
[-SimpleDisplayName <String>]
248+
[-UseMapiRichTextFormat <UseMapiRichTextFormat>]
249+
[-UsePreferMessageFormat <Boolean>]
250+
[-UserCertificate <MultiValuedProperty>]
251+
[-UserSMimeCertificate <MultiValuedProperty>]
252+
[-WhatIf]
253+
[-WindowsEmailAddress <SmtpAddress>]
254+
[<CommonParameters>]
255+
```
256+
181257
### ExcludeFromAllOrgHolds
182258
```
183259
Set-MailUser [-Identity] <MailUserIdParameter> [-ExcludeFromAllOrgHolds]
@@ -225,6 +301,8 @@ Set-MailUser [-Identity] <MailUserIdParameter> [-ExcludeFromAllOrgHolds]
225301
[-MailTip <String>]
226302
[-MailTipTranslations <MultiValuedProperty>]
227303
[-MailboxRegion <String>]
304+
[-MaxReceiveSize <MultiValuedProperty>]
305+
[-MaxSendSize <MultiValuedProperty>]
228306
[-MessageBodyFormat <MessageBodyFormat>]
229307
[-MessageFormat <MessageFormat>]
230308
[-MicrosoftOnlineServicesID <SmtpAddress>]
@@ -301,6 +379,8 @@ Set-MailUser [-Identity] <MailUserIdParameter> [-ExcludeFromOrgHolds <String[]>]
301379
[-MailboxRegion <String>]
302380
[-MailTip <String>]
303381
[-MailTipTranslations <MultiValuedProperty>]
382+
[-MaxReceiveSize <MultiValuedProperty>]
383+
[-MaxSendSize <MultiValuedProperty>]
304384
[-MessageBodyFormat <MessageBodyFormat>]
305385
[-MessageFormat <MessageFormat>]
306386
[-MicrosoftOnlineServicesID <SmtpAddress>]
@@ -377,6 +457,8 @@ Set-MailUser [-Identity] <MailUserIdParameter> [-RecalculateInactiveMailUser]
377457
[-MailboxRegion <String>]
378458
[-MailTip <String>]
379459
[-MailTipTranslations <MultiValuedProperty>]
460+
[-MaxReceiveSize <MultiValuedProperty>]
461+
[-MaxSendSize <MultiValuedProperty>]
380462
[-MessageBodyFormat <MessageBodyFormat>]
381463
[-MessageFormat <MessageFormat>]
382464
[-MicrosoftOnlineServicesID <SmtpAddress>]
@@ -453,6 +535,8 @@ Set-MailUser [-Identity] <MailUserIdParameter> [-RemoveComplianceTagHoldApplied]
453535
[-MailboxRegion <String>]
454536
[-MailTip <String>]
455537
[-MailTipTranslations <MultiValuedProperty>]
538+
[-MaxReceiveSize <MultiValuedProperty>]
539+
[-MaxSendSize <MultiValuedProperty>]
456540
[-MessageBodyFormat <MessageBodyFormat>]
457541
[-MessageFormat <MessageFormat>]
458542
[-MicrosoftOnlineServicesID <SmtpAddress>]
@@ -529,6 +613,8 @@ Set-MailUser [-Identity] <MailUserIdParameter> [-RemoveDelayHoldApplied]
529613
[-MailTip <String>]
530614
[-MailTipTranslations <MultiValuedProperty>]
531615
[-MailboxRegion <String>]
616+
[-MaxReceiveSize <MultiValuedProperty>]
617+
[-MaxSendSize <MultiValuedProperty>]
532618
[-MessageBodyFormat <MessageBodyFormat>]
533619
[-MessageFormat <MessageFormat>]
534620
[-MicrosoftOnlineServicesID <SmtpAddress>]
@@ -605,6 +691,8 @@ Set-MailUser [-Identity] <MailUserIdParameter> [-RemoveDelayReleaseHoldApplied]
605691
[-MailTip <String>]
606692
[-MailTipTranslations <MultiValuedProperty>]
607693
[-MailboxRegion <String>]
694+
[-MaxReceiveSize <MultiValuedProperty>]
695+
[-MaxSendSize <MultiValuedProperty>]
608696
[-MessageBodyFormat <MessageBodyFormat>]
609697
[-MessageFormat <MessageFormat>]
610698
[-MicrosoftOnlineServicesID <SmtpAddress>]
@@ -680,6 +768,8 @@ Set-MailUser [-Identity] <MailUserIdParameter> [-RemoveDisabledArchive]
680768
[-MailboxRegion <String>]
681769
[-MailTip <String>]
682770
[-MailTipTranslations <MultiValuedProperty>]
771+
[-MaxReceiveSize <MultiValuedProperty>]
772+
[-MaxSendSize <MultiValuedProperty>]
683773
[-MessageBodyFormat <MessageBodyFormat>]
684774
[-MessageFormat <MessageFormat>]
685775
[-MicrosoftOnlineServicesID <SmtpAddress>]
@@ -754,6 +844,8 @@ Set-MailUser [-Identity] <MailUserIdParameter> [-RemoveLitigationHoldEnabled]
754844
[-MailTip <String>]
755845
[-MailTipTranslations <MultiValuedProperty>]
756846
[-MailboxRegion <String>]
847+
[-MaxReceiveSize <MultiValuedProperty>]
848+
[-MaxSendSize <MultiValuedProperty>]
757849
[-MessageBodyFormat <MessageBodyFormat>]
758850
[-MessageFormat <MessageFormat>]
759851
[-MicrosoftOnlineServicesID <SmtpAddress>]
@@ -830,6 +922,8 @@ Set-MailUser [-Identity] <MailUserIdParameter> [-RemoveOrphanedHolds <String[]>]
830922
[-MailTip <String>]
831923
[-MailTipTranslations <MultiValuedProperty>]
832924
[-MailboxRegion <String>]
925+
[-MaxReceiveSize <MultiValuedProperty>]
926+
[-MaxSendSize <MultiValuedProperty>]
833927
[-MessageBodyFormat <MessageBodyFormat>]
834928
[-MessageFormat <MessageFormat>]
835929
[-MicrosoftOnlineServicesID <SmtpAddress>]
@@ -945,6 +1039,13 @@ Set-MailUser -Identity "John Woods" -ExternalEmailAddress [email protected]
9451039

9461040
This example modifies the external email address for the mail user named John Woods. The original external email address isn't kept as a proxy address.
9471041

1042+
### Example 2
1043+
```powershell
1044+
Set-MailUser -Identity "John Woods" -ExcludeFromAllHolds
1045+
```
1046+
1047+
In Exchange Online, this example excludes the mail user from applicable retention and app retention policies. These policies includes organization-level retention policies, user-level retention policies, compliance tag holds, delay holds, and delay release holds. The switch doesn't remove eDiscovery holds, litigation holds, or restrictive retention policies.
1048+
9481049
## PARAMETERS
9491050

9501051
### -Identity
@@ -1136,7 +1237,7 @@ The ArbitrationMailbox parameter specifies the arbitration mailbox that's used t
11361237

11371238
```yaml
11381239
Type: MailboxIdParameter
1139-
Parameter Sets: Default
1240+
Parameter Sets: Identity
11401241
Aliases:
11411242
11421243
Required: False
@@ -1174,7 +1275,7 @@ This parameter is reserved for internal Microsoft use.
11741275

11751276
```yaml
11761277
Type: MultiValuedProperty
1177-
Parameter Sets: Default
1278+
Parameter Sets: Identity
11781279
Aliases:
11791280
11801281
Required: False
@@ -1585,7 +1686,7 @@ The DomainController parameter specifies the domain controller that's used by th
15851686

15861687
```yaml
15871688
Type: Fqdn
1588-
Parameter Sets: Default
1689+
Parameter Sets: Identity
15891690
Aliases:
15901691
15911692
Required: False
@@ -1647,7 +1748,7 @@ The EmailAddressPolicyEnabled parameter specifies whether to apply email address
16471748

16481749
```yaml
16491750
Type: Boolean
1650-
Parameter Sets: Default
1751+
Parameter Sets: Identity
16511752
Aliases:
16521753
16531754
Required: False
@@ -1697,6 +1798,45 @@ Accept pipeline input: False
16971798
Accept wildcard characters: False
16981799
```
16991800

1801+
### -ExcludeFromAllHolds
1802+
1803+
> Applicable: Exchange Online, Exchange Online Protection
1804+
1805+
This parameter is available only in the cloud-based service.
1806+
1807+
The ExcludeFromAllHolds switch enables the deletion of soft deleted or inactive mail users by removing certain types of holds while preserving compliance requirements. You don't need to specify a value with this switch.
1808+
1809+
This switch removes the following types of holds:
1810+
1811+
- Organization-level retention policies and app retention policies.
1812+
- User-level retention policies and app retention policies.
1813+
- Compliance tag holds (is only removed when no restrictive policies exist).
1814+
- Delay holds (temporary holds during policy transitions).
1815+
- Delay release holds (holds that prevent immediate deletion during policy changes).
1816+
1817+
This switch doesn't remove the following types of holds:
1818+
1819+
- eDiscovery holds (maintained for compliance).
1820+
- Litigation holds (maintained for compliance).
1821+
- Restrictive retention policies (preserved for compliance rules).
1822+
- Policy configurations (doesn't update policy exclusion lists).
1823+
1824+
After you use this switch in a **Set-MailUser** command on an inactive mail user, run the following **Get-MailUser** command to confirm the results:
1825+
1826+
`Get-MailUser -SoftDeletedMailUser -Identity "[email protected]" | Format-List Name,InPlaceHolds,IsInactiveMailbox`
1827+
1828+
```yaml
1829+
Type: SwitchParameter
1830+
Parameter Sets: ExcludeFromAllHolds
1831+
Aliases:
1832+
1833+
Required: True
1834+
Position: Named
1835+
Default value: None
1836+
Accept pipeline input: False
1837+
Accept wildcard characters: False
1838+
```
1839+
17001840
### -ExcludeFromAllOrgHolds
17011841

17021842
> Applicable: Exchange Online, Exchange Online Protection
@@ -2016,7 +2156,7 @@ This switch enables the command to access Active Directory objects that aren't c
20162156

20172157
```yaml
20182158
Type: SwitchParameter
2019-
Parameter Sets: Default
2159+
Parameter Sets: Identity
20202160
Aliases:
20212161
20222162
Required: False
@@ -2184,7 +2324,7 @@ Base64 encoding increases the size of messages by approximately 33%, so specify
21842324

21852325
```yaml
21862326
Type: Unlimited
2187-
Parameter Sets: Default
2327+
Parameter Sets: (All)
21882328
Aliases:
21892329
21902330
Required: False
@@ -2215,7 +2355,7 @@ Base64 encoding increases the size of messages by approximately 33%, so specify
22152355

22162356
```yaml
22172357
Type: Unlimited
2218-
Parameter Sets: Default
2358+
Parameter Sets: (All)
22192359
Aliases:
22202360
22212361
Required: False
@@ -2492,7 +2632,7 @@ The RecoverableItemsQuota value must be greater than or equal to the Recoverable
24922632

24932633
```yaml
24942634
Type: Unlimited
2495-
Parameter Sets: Default
2635+
Parameter Sets: Identity
24962636
Aliases:
24972637
24982638
Required: False
@@ -2526,7 +2666,7 @@ The RecoverableItemsQuota value must be greater than or equal to the Recoverable
25262666

25272667
```yaml
25282668
Type: Unlimited
2529-
Parameter Sets: Default
2669+
Parameter Sets: Identity
25302670
Aliases:
25312671
25322672
Required: False
@@ -2797,7 +2937,7 @@ You can add a picture to a mail user by using the Import-RecipientDataProperty c
27972937

27982938
```yaml
27992939
Type: SwitchParameter
2800-
Parameter Sets: Default
2940+
Parameter Sets: Identity
28012941
Aliases:
28022942
28032943
Required: False
@@ -2819,7 +2959,7 @@ You can add a sound file to a mail user by using the Import-RecipientDataPropert
28192959

28202960
```yaml
28212961
Type: SwitchParameter
2822-
Parameter Sets: Default
2962+
Parameter Sets: Identity
28232963
Aliases:
28242964
28252965
Required: False
@@ -2885,7 +3025,7 @@ The SamAccountName parameter (also known as the pre-Windows 2000 user account or
28853025

28863026
```yaml
28873027
Type: String
2888-
Parameter Sets: Default
3028+
Parameter Sets: Identity
28893029
Aliases:
28903030
28913031
Required: False
@@ -2993,7 +3133,7 @@ This parameter is reserved for internal Microsoft use.
29933133

29943134
```yaml
29953135
Type: SwitchParameter
2996-
Parameter Sets: Default
3136+
Parameter Sets: Identity
29973137
Aliases:
29983138
29993139
Required: False
@@ -3025,7 +3165,7 @@ If you use this syntax, you don't need to specify all of the DTMF map values, an
30253165

30263166
```yaml
30273167
Type: MultiValuedProperty
3028-
Parameter Sets: Default
3168+
Parameter Sets: Identity
30293169
Aliases:
30303170
30313171
Required: False
@@ -3128,7 +3268,7 @@ The UserPrincipalName parameter specifies the logon name for the user account. T
31283268

31293269
```yaml
31303270
Type: String
3131-
Parameter Sets: Default
3271+
Parameter Sets: Identity
31323272
Aliases:
31333273
31343274
Required: False

0 commit comments

Comments
 (0)