From ce804c8ec080774973370e904ccc6597dca4c7a3 Mon Sep 17 00:00:00 2001 From: Rishabh Kumar Date: Thu, 4 Dec 2025 17:40:07 +0530 Subject: [PATCH 1/9] Add compliance hold documentation for Set-Mailbox and Set-MailUser - Add RemoveComplianceTagHoldApplied parameter documentation to Set-Mailbox - Add ProvideConsent parameter documentation for active mailbox consent - Add examples for removing compliance tag holds from inactive, active, and group mailboxes - Update ExcludeFromAllHolds documentation to include group mailbox support - Add examples for ExcludeFromAllHolds with group and inactive mailboxes - Add ExcludeFromAllHolds parameter documentation to Set-MailUser - Add example for removing holds from inactive mail users --- .../ExchangePowerShell/Set-MailUser.md | 124 ++++++++++ .../ExchangePowerShell/Set-Mailbox.md | 232 +++++++++++++++++- 2 files changed, 355 insertions(+), 1 deletion(-) diff --git a/exchange/exchange-ps/ExchangePowerShell/Set-MailUser.md b/exchange/exchange-ps/ExchangePowerShell/Set-MailUser.md index 1366560786..ded89a3545 100644 --- a/exchange/exchange-ps/ExchangePowerShell/Set-MailUser.md +++ b/exchange/exchange-ps/ExchangePowerShell/Set-MailUser.md @@ -178,6 +178,82 @@ Set-MailUser [-Identity] [-EnableLitigationHoldForMigratio [] ``` +### ExcludeFromAllHolds +``` +Set-MailUser [-Identity] [-ExcludeFromAllHolds] + [-AcceptMessagesOnlyFrom ] + [-AcceptMessagesOnlyFromDLMembers ] + [-AcceptMessagesOnlyFromSendersOrMembers ] + [-Alias ] + [-ArchiveGuid ] + [-BypassModerationFromSendersOrMembers ] + [-Confirm] + [-CreateDTMFMap ] + [-CustomAttribute1 ] + [-CustomAttribute10 ] + [-CustomAttribute11 ] + [-CustomAttribute12 ] + [-CustomAttribute13 ] + [-CustomAttribute14 ] + [-CustomAttribute15 ] + [-CustomAttribute2 ] + [-CustomAttribute3 ] + [-CustomAttribute4 ] + [-CustomAttribute5 ] + [-CustomAttribute6 ] + [-CustomAttribute7 ] + [-CustomAttribute8 ] + [-CustomAttribute9 ] + [-DataEncryptionPolicy ] + [-DisplayName ] + [-EmailAddresses ] + [-ExchangeGuid ] + [-ExtensionCustomAttribute1 ] + [-ExtensionCustomAttribute2 ] + [-ExtensionCustomAttribute3 ] + [-ExtensionCustomAttribute4 ] + [-ExtensionCustomAttribute5 ] + [-ExternalEmailAddress ] + [-FederatedIdentity ] + [-ForceUpgrade] + [-GrantSendOnBehalfTo ] + [-HiddenFromAddressListsEnabled ] + [-HVEAccount] + [-ImmutableId ] + [-JournalArchiveAddress ] + [-MacAttachmentFormat ] + [-MailTip ] + [-MailTipTranslations ] + [-MailboxRegion ] + [-MessageBodyFormat ] + [-MessageFormat ] + [-MicrosoftOnlineServicesID ] + [-ModeratedBy ] + [-ModerationEnabled ] + [-Name ] + [-Password ] + [-PrimarySmtpAddress ] + [-RecipientLimits ] + [-RejectMessagesFrom ] + [-RejectMessagesFromDLMembers ] + [-RejectMessagesFromSendersOrMembers ] + [-RemoveMailboxProvisioningConstraint] + [-RequireSenderAuthenticationEnabled ] + [-ResetPasswordOnNextLogon ] + [-SecondaryAddress ] + [-SecondaryDialPlan ] + [-SendModerationNotifications ] + [-SimpleDisplayName ] + [-UMDtmfMap ] + [-UseMapiRichTextFormat ] + [-UsePreferMessageFormat ] + [-UserCertificate ] + [-UserSMimeCertificate ] + [-WhatIf] + [-WindowsEmailAddress ] + [] +``` + ### ExcludeFromAllOrgHolds ``` Set-MailUser [-Identity] [-ExcludeFromAllOrgHolds] @@ -945,6 +1021,13 @@ Set-MailUser -Identity "John Woods" -ExternalEmailAddress john@tailspintoys.com 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. +### Example 2 +```powershell +Get-MailUser -SoftDeletedMailUser -Identity "former.employee@contoso.com" | Set-MailUser -ExcludeFromAllHolds +``` + +This example permanently deletes an inactive mail user by removing all eligible holds. This includes organization-level retention policies, user-level retention policies, compliance tag holds, delay holds, and delay release holds. The switch does not remove eDiscovery holds, litigation holds, or restrictive retention policies. + ## PARAMETERS ### -Identity @@ -1697,6 +1780,47 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ExcludeFromAllHolds + +> Applicable: Exchange Online, Exchange Online Protection + +This parameter is available only in the cloud-based service. + +The ExcludeFromAllHolds switch permanently deletes inactive mail users by removing certain types of holds while preserving compliance requirements. You don't need to specify a value with this switch. + +This switch is used with soft-deleted or inactive mail users (retrieved using Get-MailUser with the -SoftDeletedMailUser switch). + +This switch removes the following types of holds: + +- Organization-level retention policies (organization-wide holds that apply to all or most mail users). +- User-level retention policies (specific mail user holds with targeted scope). +- Compliance tag holds (content-based retention holds when no restrictive policies exist). +- Delay holds (temporary holds during policy transitions). +- Delay release holds (holds that prevent immediate deletion during policy changes). + +This switch doesn't remove the following types of holds: + +- eDiscovery holds (maintained for compliance). +- Litigation holds (maintained for compliance). +- Restrictive retention policies (preserved for compliance rules). +- Policy configurations (doesn't update policy exclusion lists). + +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: + +`Get-MailUser -SoftDeletedMailUser -Identity "former.user@contoso.com" | Format-List Name,InPlaceHolds` + +```yaml +Type: SwitchParameter +Parameter Sets: ExcludeFromAllHolds +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ExcludeFromAllOrgHolds > Applicable: Exchange Online, Exchange Online Protection diff --git a/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md b/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md index c25b40f69f..c0fa7f48e8 100644 --- a/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md +++ b/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md @@ -1119,6 +1119,137 @@ Set-Mailbox [-Identity] [] ``` +### RemoveComplianceTagHoldApplied +``` +Set-Mailbox [-Identity] + [-RemoveComplianceTagHoldApplied] + [-AcceptMessagesOnlyFrom ] + [-AcceptMessagesOnlyFromDLMembers ] + [-AcceptMessagesOnlyFromSendersOrMembers ] + [-AccountDisabled ] + [-AddressBookPolicy ] + [-Alias ] + [-ApplyMandatoryProperties] + [-ArchiveName ] + [-AuditAdmin ] + [-AuditDelegate ] + [-AuditEnabled ] + [-AuditLogAgeLimit ] + [-AuditOwner ] + [-BypassModerationFromSendersOrMembers ] + [-CalendarRepairDisabled ] + [-CalendarVersionStoreDisabled ] + [-ClearThrottlingPolicyAssignment] + [-CreateDTMFMap ] + [-CustomAttribute1 ] + [-CustomAttribute10 ] + [-CustomAttribute11 ] + [-CustomAttribute12 ] + [-CustomAttribute13 ] + [-CustomAttribute14 ] + [-CustomAttribute15 ] + [-CustomAttribute2 ] + [-CustomAttribute3 ] + [-CustomAttribute4 ] + [-CustomAttribute5 ] + [-CustomAttribute6 ] + [-CustomAttribute7 ] + [-CustomAttribute8 ] + [-CustomAttribute9 ] + [-DataEncryptionPolicy ] + [-DefaultAuditSet ] + [-DefaultPublicFolderMailbox ] + [-DeliverToMailboxAndForward ] + [-DisplayName ] + [-ElcProcessingDisabled ] + [-EmailAddressDisplayNames ] + [-EmailAddresses ] + [-EnableRoomMailboxAccount ] + [-EndDateForRetentionHold ] + [-EnforcedTimestamps ] + [-ExtensionCustomAttribute1 ] + [-ExtensionCustomAttribute2 ] + [-ExtensionCustomAttribute3 ] + [-ExtensionCustomAttribute4 ] + [-ExtensionCustomAttribute5 ] + [-ExternalOofOptions ] + [-Force] + [-ForwardingAddress ] + [-ForwardingSmtpAddress ] + [-GrantSendOnBehalfTo ] + [-GroupMailbox ] + [-HiddenFromAddressListsEnabled ] + [-ImListMigrationCompleted ] + [-ImmutableId ] + [-InactiveMailbox] + [-IsExcludedFromServingHierarchy ] + [-IssueWarningQuota ] + [-JournalArchiveAddress ] + [-Languages ] + [-LitigationHoldDate ] + [-LitigationHoldDuration ] + [-LitigationHoldEnabled ] + [-LitigationHoldOwner ] + [-MailboxRegion ] + [-MailTip ] + [-MailTipTranslations ] + [-MaxReceiveSize ] + [-MaxSendSize ] + [-MessageCopyForSendOnBehalfEnabled ] + [-MessageCopyForSentAsEnabled ] + [-MessageCopyForSMTPClientSubmissionEnabled ] + [-MessageTrackingReadStatusEnabled ] + [-MicrosoftOnlineServicesID ] + [-ModeratedBy ] + [-ModerationEnabled ] + [-Name ] + [-NonCompliantDevices ] + [-Office ] + [-Password ] + [-ProhibitSendQuota ] + [-ProhibitSendReceiveQuota ] + [-ProvisionedForOfficeGraph] + [-PublicFolder] + [-RecipientLimits ] + [-RejectMessagesFrom ] + [-RejectMessagesFromDLMembers ] + [-RejectMessagesFromSendersOrMembers ] + [-RemoveMailboxProvisioningConstraint] + [-RequireSenderAuthenticationEnabled ] + [-ResourceCapacity ] + [-ResourceCustom ] + [-RetainDeletedItemsFor ] + [-RetentionComment ] + [-RetentionHoldEnabled ] + [-RetentionPolicy ] + [-RetentionUrl ] + [-RoleAssignmentPolicy ] + [-RoomMailboxPassword ] + [-RulesQuota ] + [-SchedulerAssistant ] + [-SecondaryAddress ] + [-SecondaryDialPlan ] + [-SendModerationNotifications ] + [-SharingPolicy ] + [-SimpleDisplayName ] + [-SingleItemRecoveryEnabled ] + [-StartDateForRetentionHold ] + [-StsRefreshTokensValidFrom ] + [-Type ] + [-UMDtmfMap ] + [-UniqueRecipientsCountLimitLevel ] + [-UniqueUnrestrictedGroupsLimitEnabled ] + [-UpdateEnforcedTimestamp] + [-UseDatabaseQuotaDefaults ] + [-UseDatabaseRetentionDefaults ] + [-UserCertificate ] + [-UserSMimeCertificate ] + [-WindowsEmailAddress ] + [-Confirm] + [-WhatIf] + [] + ``` + ### RemoveDisabledArchive ``` Set-Mailbox [-Identity] @@ -1450,6 +1581,41 @@ Set-Mailbox -Identity asraf@contoso.com -RemoveDelayReleaseHoldApplied In Exchange Online, this example removes the delay hold that's applied to Asraf's mailbox so an offboarding migration (that is, a mailbox migration from Exchange Online back to on-premises Exchange) can continue successfully. For more information about delay holds, see [Managing mailboxes on delay hold](https://learn.microsoft.com/purview/ediscovery-identify-a-hold-on-an-exchange-online-mailbox#managing-mailboxes-on-delay-hold). +### Example 9 +```powershell +Set-Mailbox -Identity inactive.user@contoso.com -InactiveMailbox -RemoveComplianceTagHoldApplied +``` + +This example removes compliance tag holds from an inactive mailbox. Because the mailbox is inactive, the ProvideConsent switch is not required. + +### Example 10 +```powershell +Set-Mailbox -Identity john.smith@contoso.com -RemoveComplianceTagHoldApplied -ProvideConsent +``` + +This example removes compliance tag holds from an active mailbox. The ProvideConsent switch is required to acknowledge that you understand the implications of removing the hold from an active mailbox, which may result in the permanent deletion of content that was previously protected. + +### Example 11 +```powershell +Set-Mailbox -Identity salesteam@contoso.com -GroupMailbox -RemoveComplianceTagHoldApplied +``` + +This example removes compliance tag holds from a group mailbox. The ProvideConsent switch is not required for group mailboxes. + +### Example 12 +```powershell +Set-Mailbox -Identity "Sales Team" -GroupMailbox -ExcludeFromAllHolds +``` + +This example removes all eligible holds from a group mailbox named "Sales Team". This includes organization-level retention policies, user-level retention policies, compliance tag holds, delay holds, and delay release holds. The switch does not remove eDiscovery holds, litigation holds, or restrictive retention policies. + +### Example 13 +```powershell +Get-Mailbox -InactiveMailboxOnly -Identity "former.employee@contoso.com" | Set-Mailbox -InactiveMailbox -ExcludeFromAllHolds +``` + +This example permanently deletes an inactive mailbox by removing all eligible holds. After running this command, verify the result using: `Get-Mailbox -InactiveMailboxOnly -Identity "former.employee@contoso.com" | Format-List Name,InPlaceHolds,IsInactiveMailbox` + ## PARAMETERS ### -Identity @@ -3075,7 +3241,11 @@ Accept wildcard characters: False This parameter is available only in the cloud-based service. -The ExcludeFromAllHolds switch permanetly deletes inactive mailboxes by removing holds while preserving complaince requirements. You don't need to specific a value with this switch. +The ExcludeFromAllHolds switch permanently deletes inactive mailboxes or removes holds from group mailboxes by removing certain types of holds while preserving compliance requirements. You don't need to specify a value with this switch. + +This switch can be used with: +- Inactive mailboxes (use with the InactiveMailbox switch) +- Group mailboxes (use with the GroupMailbox switch) This switch removes the following types of holds: @@ -3096,6 +3266,10 @@ After you use this switch in a **Set-Mailbox** command on an inactive mailbox, r `Get-Mailbox -InactiveMailboxOnly -Identity "lila@contoso.com" | Format-List Name,InPlaceHolds,IsInactiveMailbox` +For group mailboxes, you can verify the hold status using: + +`Get-Mailbox -GroupMailbox -Identity "salesteam@contoso.com" | Format-List Name,InPlaceHolds` + ```yaml Type: SwitchParameter Parameter Sets: ExcludeFromAllHolds @@ -4908,6 +5082,34 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProvideConsent + +> Applicable: Exchange Online, Exchange Online Protection + +This parameter is available only in the cloud-based service. + +The ProvideConsent switch acknowledges that you understand the implications of removing compliance tag holds from an active mailbox. You don't need to specify a value with this switch. + +This switch is required when using the RemoveComplianceTagHoldApplied switch to remove compliance tag holds from an active mailbox. By providing consent, you acknowledge that: + +- Removing the compliance tag hold may result in the permanent deletion of mailbox that was previously protected by the hold. +- This action may have legal or compliance implications for your organization. +- Once the hold is removed and content is deleted, it cannot be recovered. + +This switch is not required when removing compliance tag holds from inactive mailboxes. + +```yaml +Type: SwitchParameter +Parameter Sets: RemoveComplianceTagHoldApplied, ProvideConsent +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PublicFolder > Applicable: Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE, Exchange Online @@ -5244,6 +5446,34 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -RemoveComplianceTagHoldApplied + +> Applicable: Exchange Online, Exchange Online Protection + +This parameter is available only in the cloud-based service. + +The RemoveComplianceTagHoldApplied switch specifies whether to remove compliance tag holds from the mailbox. You don't need to specify a value with this switch. + +Compliance tags (also known as retention labels) can be applied to mailbox items to retain or delete content based on organizational policies. When a compliance tag with a hold action is applied, it prevents the deletion of content until the hold period expires or is manually removed. This switch allows you to remove such holds from the mailbox. + +By default, you can only remove compliance tag holds from inactive mailboxes or group mailboxes. To remove compliance tag holds from an active mailbox, you must also use the ProvideConsent switch to acknowledge that you understand the implications of removing the hold. + +You can use this switch with the GroupMailbox or InactiveMailbox switch to remove compliance tag holds from group mailboxes or inactive mailboxes. + +For more information about compliance tags and retention, see [Learn about retention policies and retention labels](https://learn.microsoft.com/purview/retention). + +```yaml +Type: SwitchParameter +Parameter Sets: RemoveComplianceTagHoldApplied +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RemoveDisabledArchive > Applicable: Exchange Online From 7195d1ef14507e8a2c151189eb2c026f31aa2a86 Mon Sep 17 00:00:00 2001 From: Rishabh Kumar Date: Thu, 4 Dec 2025 17:47:32 +0530 Subject: [PATCH 2/9] updating example --- .../ExchangePowerShell/Set-Mailbox.md | 26 +++---------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md b/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md index c0fa7f48e8..a3bb4164f2 100644 --- a/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md +++ b/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md @@ -1597,25 +1597,11 @@ This example removes compliance tag holds from an active mailbox. The ProvideCon ### Example 11 ```powershell -Set-Mailbox -Identity salesteam@contoso.com -GroupMailbox -RemoveComplianceTagHoldApplied -``` - -This example removes compliance tag holds from a group mailbox. The ProvideConsent switch is not required for group mailboxes. - -### Example 12 -```powershell Set-Mailbox -Identity "Sales Team" -GroupMailbox -ExcludeFromAllHolds ``` This example removes all eligible holds from a group mailbox named "Sales Team". This includes organization-level retention policies, user-level retention policies, compliance tag holds, delay holds, and delay release holds. The switch does not remove eDiscovery holds, litigation holds, or restrictive retention policies. -### Example 13 -```powershell -Get-Mailbox -InactiveMailboxOnly -Identity "former.employee@contoso.com" | Set-Mailbox -InactiveMailbox -ExcludeFromAllHolds -``` - -This example permanently deletes an inactive mailbox by removing all eligible holds. After running this command, verify the result using: `Get-Mailbox -InactiveMailboxOnly -Identity "former.employee@contoso.com" | Format-List Name,InPlaceHolds,IsInactiveMailbox` - ## PARAMETERS ### -Identity @@ -3243,10 +3229,6 @@ This parameter is available only in the cloud-based service. The ExcludeFromAllHolds switch permanently deletes inactive mailboxes or removes holds from group mailboxes by removing certain types of holds while preserving compliance requirements. You don't need to specify a value with this switch. -This switch can be used with: -- Inactive mailboxes (use with the InactiveMailbox switch) -- Group mailboxes (use with the GroupMailbox switch) - This switch removes the following types of holds: - Organization-level retention policies (organization-wide holds that apply to all or most mailboxes). @@ -3268,7 +3250,7 @@ After you use this switch in a **Set-Mailbox** command on an inactive mailbox, r For group mailboxes, you can verify the hold status using: -`Get-Mailbox -GroupMailbox -Identity "salesteam@contoso.com" | Format-List Name,InPlaceHolds` +`Get-Mailbox -GroupMailbox -Identity "salesteam@contoso.com" -SoftDeletedMailbox | Format-List Name,InPlaceHolds,IsInactiveMailbox` ```yaml Type: SwitchParameter @@ -5454,11 +5436,9 @@ This parameter is available only in the cloud-based service. The RemoveComplianceTagHoldApplied switch specifies whether to remove compliance tag holds from the mailbox. You don't need to specify a value with this switch. -Compliance tags (also known as retention labels) can be applied to mailbox items to retain or delete content based on organizational policies. When a compliance tag with a hold action is applied, it prevents the deletion of content until the hold period expires or is manually removed. This switch allows you to remove such holds from the mailbox. - -By default, you can only remove compliance tag holds from inactive mailboxes or group mailboxes. To remove compliance tag holds from an active mailbox, you must also use the ProvideConsent switch to acknowledge that you understand the implications of removing the hold. +Compliance tags (also known as retention labels) can be applied to mailbox items to retain or delete content based on organizational policies. When a compliance tag with a hold action is applied, ComplianceTagHoldApplied is set to true to prevent the deletion of mailbox. This switch allows you to remove such holds from the mailbox. -You can use this switch with the GroupMailbox or InactiveMailbox switch to remove compliance tag holds from group mailboxes or inactive mailboxes. +By default, you can only remove compliance tag holds from inactive mailboxes. To remove compliance tag holds from an active mailbox, you must also use the ProvideConsent switch to acknowledge that you understand the implications of removing the hold. For more information about compliance tags and retention, see [Learn about retention policies and retention labels](https://learn.microsoft.com/purview/retention). From 910e50de03201d3a35c7334b13df911950fdddfa Mon Sep 17 00:00:00 2001 From: Rishabh Kumar Date: Thu, 4 Dec 2025 17:54:57 +0530 Subject: [PATCH 3/9] updating mailuser --- .../ExchangePowerShell/Set-MailUser.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/exchange/exchange-ps/ExchangePowerShell/Set-MailUser.md b/exchange/exchange-ps/ExchangePowerShell/Set-MailUser.md index ded89a3545..ae8fd9bf39 100644 --- a/exchange/exchange-ps/ExchangePowerShell/Set-MailUser.md +++ b/exchange/exchange-ps/ExchangePowerShell/Set-MailUser.md @@ -1023,10 +1023,10 @@ This example modifies the external email address for the mail user named John Wo ### Example 2 ```powershell -Get-MailUser -SoftDeletedMailUser -Identity "former.employee@contoso.com" | Set-MailUser -ExcludeFromAllHolds +Set-MailUser -Identity "John Woods" -ExcludeFromAllHolds ``` -This example permanently deletes an inactive mail user by removing all eligible holds. This includes organization-level retention policies, user-level retention policies, compliance tag holds, delay holds, and delay release holds. The switch does not remove eDiscovery holds, litigation holds, or restrictive retention policies. +This example excludes the mail user from applicable retention and app retention policies. This includes organization-level retention policies, user-level retention policies, compliance tag holds, delay holds, and delay release holds. The switch does not remove eDiscovery holds, litigation holds, or restrictive retention policies. ## PARAMETERS @@ -1786,15 +1786,15 @@ Accept wildcard characters: False This parameter is available only in the cloud-based service. -The ExcludeFromAllHolds switch permanently deletes inactive mail users by removing certain types of holds while preserving compliance requirements. You don't need to specify a value with this switch. +The ExcludeFromAllHolds switch enables deletion of inactive mail users by removing certain types of holds while preserving compliance requirements. You don't need to specify a value with this switch. -This switch is used with soft-deleted or inactive mail users (retrieved using Get-MailUser with the -SoftDeletedMailUser switch). +This switch is used with soft-deleted or inactive mail users. This switch removes the following types of holds: -- Organization-level retention policies (organization-wide holds that apply to all or most mail users). -- User-level retention policies (specific mail user holds with targeted scope). -- Compliance tag holds (content-based retention holds when no restrictive policies exist). +- Organization-level retention policies and app retention policies. +- User-level retention policies and app retention policies. +- Compliance tag holds (is only removed when no restrictive policies exist). - Delay holds (temporary holds during policy transitions). - Delay release holds (holds that prevent immediate deletion during policy changes). @@ -1807,7 +1807,7 @@ This switch doesn't remove the following types of holds: 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: -`Get-MailUser -SoftDeletedMailUser -Identity "former.user@contoso.com" | Format-List Name,InPlaceHolds` +`Get-MailUser -SoftDeletedMailUser -Identity "former.user@contoso.com" | Format-List Name,InPlaceHolds,IsInactiveMailbox` ```yaml Type: SwitchParameter From 93612cec3faf7303c9de920a1bddac417779dee0 Mon Sep 17 00:00:00 2001 From: Rishabh Kumar Date: Thu, 4 Dec 2025 17:58:23 +0530 Subject: [PATCH 4/9] updating mailbox --- exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md b/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md index a3bb4164f2..6bc5934eef 100644 --- a/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md +++ b/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md @@ -3227,7 +3227,7 @@ Accept wildcard characters: False This parameter is available only in the cloud-based service. -The ExcludeFromAllHolds switch permanently deletes inactive mailboxes or removes holds from group mailboxes by removing certain types of holds while preserving compliance requirements. You don't need to specify a value with this switch. +The ExcludeFromAllHolds switch allow admins to permanently delete inactive mailboxes and group mailboxes by removing certain types of holds while preserving compliance requirements. You don't need to specify a value with this switch. This switch removes the following types of holds: @@ -3246,7 +3246,7 @@ This switch doesn't remove the following types of holds: After you use this switch in a **Set-Mailbox** command on an inactive mailbox, run the following **Get-Mailbox** command to confirm the results: -`Get-Mailbox -InactiveMailboxOnly -Identity "lila@contoso.com" | Format-List Name,InPlaceHolds,IsInactiveMailbox` +`Get-Mailbox -SoftDeletedMailbox -Identity "lila@contoso.com" | Format-List Name,InPlaceHolds,IsInactiveMailbox` For group mailboxes, you can verify the hold status using: From a8cf04bca64726352d786dd9b55e10acf33cdb51 Mon Sep 17 00:00:00 2001 From: Chris Davis Date: Tue, 9 Dec 2025 17:11:55 -0800 Subject: [PATCH 5/9] Update Set-Mailbox.md Corrected alphabetization in parameter sets and parameter locations, corrected parameters available/not available in RemoveComplianceTagHoldApplied based on current reality, added missing ProvideConsent parameter set, and added new observed AutoArchivingEnabled parameter. --- .../ExchangePowerShell/Set-Mailbox.md | 297 +++++++++++++----- 1 file changed, 223 insertions(+), 74 deletions(-) diff --git a/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md b/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md index 6bc5934eef..bd0544012c 100644 --- a/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md +++ b/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md @@ -47,6 +47,7 @@ Set-Mailbox [-Identity] [-AuditLog] [-AuditLogAgeLimit ] [-AuditOwner ] + [-AutoArchivingEnabled ] [-AuxAuditLog] [-BypassModerationFromSendersOrMembers ] [-CalendarLoggingQuota ] @@ -224,6 +225,7 @@ Set-Mailbox [-Identity] [-ExcludeFromAllHolds] [-AuditEnabled ] [-AuditLogAgeLimit ] [-AuditOwner ] + [-AutoArchivingEnabled ] [-BypassModerationFromSendersOrMembers ] [-CalendarRepairDisabled ] [-CalendarVersionStoreDisabled ] @@ -334,8 +336,7 @@ Set-Mailbox [-Identity] [-ExcludeFromAllHolds] ### ExcludeFromAllOrgHolds ``` -Set-Mailbox [-Identity] - [-ExcludeFromAllOrgHolds] +Set-Mailbox [-Identity] [-ExcludeFromAllOrgHolds] [-AcceptMessagesOnlyFrom ] [-AcceptMessagesOnlyFromDLMembers ] [-AcceptMessagesOnlyFromSendersOrMembers ] @@ -349,6 +350,7 @@ Set-Mailbox [-Identity] [-AuditEnabled ] [-AuditLogAgeLimit ] [-AuditOwner ] + [-AutoArchivingEnabled ] [-AuxAuditLog] [-BypassModerationFromSendersOrMembers ] [-CalendarRepairDisabled ] @@ -481,6 +483,7 @@ Set-Mailbox [-Identity] [-ExcludeFromOrgHolds ] [-AuditEnabled ] [-AuditLogAgeLimit ] [-AuditOwner ] + [-AutoArchivingEnabled ] [-AuxAuditLog] [-BypassModerationFromSendersOrMembers ] [-CalendarRepairDisabled ] @@ -613,6 +616,7 @@ Set-Mailbox [-Identity] -IsExchangeCloudManaged [-AuditEnabled ] [-AuditLogAgeLimit ] [-AuditOwner ] + [-AutoArchivingEnabled ] [-BypassModerationFromSendersOrMembers ] [-CalendarRepairDisabled ] [-CalendarVersionStoreDisabled ] @@ -722,10 +726,135 @@ Set-Mailbox [-Identity] -IsExchangeCloudManaged [] ``` +### ProvideConsent +``` +Set-Mailbox [-Identity] [-ProvideConsent] + [-AcceptMessagesOnlyFrom ] + [-AcceptMessagesOnlyFromDLMembers ] + [-AcceptMessagesOnlyFromSendersOrMembers ] + [-AccountDisabled ] + [-AddressBookPolicy ] + [-Alias ] + [-ApplyMandatoryProperties] + [-ArchiveName ] + [-AuditAdmin ] + [-AuditDelegate ] + [-AuditEnabled ] + [-AuditLogAgeLimit ] + [-AuditOwner ] + [-AutoArchivingEnabled ] + [-BypassModerationFromSendersOrMembers ] + [-CalendarRepairDisabled ] + [-CalendarVersionStoreDisabled ] + [-ClearThrottlingPolicyAssignment] + [-Confirm] + [-CustomAttribute1 ] + [-CustomAttribute10 ] + [-CustomAttribute11 ] + [-CustomAttribute12 ] + [-CustomAttribute13 ] + [-CustomAttribute14 ] + [-CustomAttribute15 ] + [-CustomAttribute2 ] + [-CustomAttribute3 ] + [-CustomAttribute4 ] + [-CustomAttribute5 ] + [-CustomAttribute6 ] + [-CustomAttribute7 ] + [-CustomAttribute8 ] + [-CustomAttribute9 ] + [-DataEncryptionPolicy ] + [-DefaultAuditSet ] + [-DefaultPublicFolderMailbox ] + [-DeliverToMailboxAndForward ] + [-DisplayName ] + [-ElcProcessingDisabled ] + [-EmailAddressDisplayNames ] + [-EmailAddresses ] + [-EnableRoomMailboxAccount ] + [-EndDateForRetentionHold ] + [-EnforcedTimestamps ] + [-ExtensionCustomAttribute1 ] + [-ExtensionCustomAttribute2 ] + [-ExtensionCustomAttribute3 ] + [-ExtensionCustomAttribute4 ] + [-ExtensionCustomAttribute5 ] + [-ExternalOofOptions ] + [-Force] + [-ForwardingAddress ] + [-ForwardingSmtpAddress ] + [-GrantSendOnBehalfTo ] + [-GroupMailbox] + [-HiddenFromAddressListsEnabled ] + [-ImmutableId ] + [-InactiveMailbox] + [-IsExcludedFromServingHierarchy ] + [-IssueWarningQuota ] + [-JournalArchiveAddress ] + [-Languages ] + [-LitigationHoldDate ] + [-LitigationHoldDuration ] + [-LitigationHoldEnabled ] + [-LitigationHoldOwner ] + [-MailboxRegion ] + [-MailTip ] + [-MailTipTranslations ] + [-MaxReceiveSize ] + [-MaxSendSize ] + [-MessageCopyForSendOnBehalfEnabled ] + [-MessageCopyForSentAsEnabled ] + [-MessageCopyForSMTPClientSubmissionEnabled ] + [-MessageTrackingReadStatusEnabled ] + [-MicrosoftOnlineServicesID ] + [-ModeratedBy ] + [-ModerationEnabled ] + [-Name ] + [-NonCompliantDevices ] + [-Office ] + [-Password ] + [-ProhibitSendQuota ] + [-ProhibitSendReceiveQuota ] + [-ProvisionedForOfficeGraph] + [-PublicFolder] + [-RecipientLimits ] + [-RejectMessagesFrom ] + [-RejectMessagesFromDLMembers ] + [-RejectMessagesFromSendersOrMembers ] + [-RemoveMailboxProvisioningConstraint] + [-RequireSenderAuthenticationEnabled ] + [-ResourceCapacity ] + [-ResourceCustom ] + [-RetainDeletedItemsFor ] + [-RetentionComment ] + [-RetentionHoldEnabled ] + [-RetentionPolicy ] + [-RetentionUrl ] + [-RoleAssignmentPolicy ] + [-RoomMailboxPassword ] + [-RulesQuota ] + [-SchedulerAssistant ] + [-SendModerationNotifications ] + [-SharingPolicy ] + [-SimpleDisplayName ] + [-SingleItemRecoveryEnabled ] + [-StartDateForRetentionHold ] + [-StsRefreshTokensValidFrom ] + [-Type ] + [-UniqueRecipientsCountLimitLevel ] + [-UniqueUnrestrictedGroupsLimitEnabled ] + [-UpdateEnforcedTimestamp] + [-UseDatabaseQuotaDefaults ] + [-UseDatabaseRetentionDefaults ] + [-UserCertificate ] + [-UserSMimeCertificate ] + [-WindowsEmailAddress ] + [-WhatIf] + [] + ``` + ### RecalculateInactiveMailbox ``` -Set-Mailbox [-Identity] - [-RecalculateInactiveMailbox] +Set-Mailbox [-Identity] [-RecalculateInactiveMailbox] [-AcceptMessagesOnlyFrom ] [-AcceptMessagesOnlyFromDLMembers ] [-AcceptMessagesOnlyFromSendersOrMembers ] @@ -739,6 +868,7 @@ Set-Mailbox [-Identity] [-AuditEnabled ] [-AuditLogAgeLimit ] [-AuditOwner ] + [-AutoArchivingEnabled ] [-AuxAuditLog] [-BypassModerationFromSendersOrMembers ] [-CalendarRepairDisabled ] @@ -855,10 +985,9 @@ Set-Mailbox [-Identity] [] ``` -### RemoveDelayHoldApplied +### RemoveComplianceTagHoldApplied ``` -Set-Mailbox [-Identity] - [-RemoveDelayHoldApplied] +Set-Mailbox [-Identity] [-ProvideConsent] [-RemoveComplianceTagHoldApplied] [-AcceptMessagesOnlyFrom ] [-AcceptMessagesOnlyFromDLMembers ] [-AcceptMessagesOnlyFromSendersOrMembers ] @@ -872,13 +1001,12 @@ Set-Mailbox [-Identity] [-AuditEnabled ] [-AuditLogAgeLimit ] [-AuditOwner ] - [-AuxAuditLog] + [-AutoArchivingEnabled ] [-BypassModerationFromSendersOrMembers ] [-CalendarRepairDisabled ] [-CalendarVersionStoreDisabled ] [-ClearThrottlingPolicyAssignment] [-Confirm] - [-CreateDTMFMap ] [-CustomAttribute1 ] [-CustomAttribute10 ] [-CustomAttribute11 ] @@ -903,7 +1031,7 @@ Set-Mailbox [-Identity] [-EmailAddressDisplayNames ] [-EmailAddresses ] [-EnableRoomMailboxAccount ] - [-EndDateForRetentionHold ] + [-EndDateForRetentionHold ] [-EnforcedTimestamps ] [-ExtensionCustomAttribute1 ] [-ExtensionCustomAttribute2 ] @@ -915,16 +1043,15 @@ Set-Mailbox [-Identity] [-ForwardingAddress ] [-ForwardingSmtpAddress ] [-GrantSendOnBehalfTo ] - [-GroupMailbox ] + [-GroupMailbox] [-HiddenFromAddressListsEnabled ] - [-ImListMigrationCompleted ] [-ImmutableId ] [-InactiveMailbox] [-IsExcludedFromServingHierarchy ] [-IssueWarningQuota ] [-JournalArchiveAddress ] [-Languages ] - [-LitigationHoldDate ] + [-LitigationHoldDate ] [-LitigationHoldDuration ] [-LitigationHoldEnabled ] [-LitigationHoldOwner ] @@ -936,7 +1063,6 @@ Set-Mailbox [-Identity] [-MessageCopyForSendOnBehalfEnabled ] [-MessageCopyForSentAsEnabled ] [-MessageCopyForSMTPClientSubmissionEnabled ] - [-MessageTracking ] [-MessageTrackingReadStatusEnabled ] [-MicrosoftOnlineServicesID ] [-ModeratedBy ] @@ -955,7 +1081,7 @@ Set-Mailbox [-Identity] [-RejectMessagesFromSendersOrMembers ] [-RemoveMailboxProvisioningConstraint] [-RequireSenderAuthenticationEnabled ] - [-ResourceCapacity ] + [-ResourceCapacity ] [-ResourceCustom ] [-RetainDeletedItemsFor ] [-RetentionComment ] @@ -966,16 +1092,13 @@ Set-Mailbox [-Identity] [-RoomMailboxPassword ] [-RulesQuota ] [-SchedulerAssistant ] - [-SecondaryAddress ] - [-SecondaryDialPlan ] [-SendModerationNotifications ] [-SharingPolicy ] [-SimpleDisplayName ] [-SingleItemRecoveryEnabled ] - [-SkipDualWrite] - [-StartDateForRetentionHold ] + [-StartDateForRetentionHold ] + [-StsRefreshTokensValidFrom ] [-Type ] - [-UMDtmfMap ] [-UniqueRecipientsCountLimitLevel ] [-UniqueUnrestrictedGroupsLimitEnabled ] [-UpdateEnforcedTimestamp] @@ -983,15 +1106,15 @@ Set-Mailbox [-Identity] [-UseDatabaseRetentionDefaults ] [-UserCertificate ] [-UserSMimeCertificate ] - [-WhatIf] [-WindowsEmailAddress ] + [-WhatIf] [] -``` + ``` -### RemoveDelayReleaseHoldApplied +### RemoveDelayHoldApplied ``` Set-Mailbox [-Identity] - [-RemoveDelayReleaseHoldApplied] + [-RemoveDelayHoldApplied] [-AcceptMessagesOnlyFrom ] [-AcceptMessagesOnlyFromDLMembers ] [-AcceptMessagesOnlyFromSendersOrMembers ] @@ -1005,10 +1128,13 @@ Set-Mailbox [-Identity] [-AuditEnabled ] [-AuditLogAgeLimit ] [-AuditOwner ] + [-AutoArchivingEnabled ] + [-AuxAuditLog] [-BypassModerationFromSendersOrMembers ] [-CalendarRepairDisabled ] [-CalendarVersionStoreDisabled ] [-ClearThrottlingPolicyAssignment] + [-Confirm] [-CreateDTMFMap ] [-CustomAttribute1 ] [-CustomAttribute10 ] @@ -1034,7 +1160,7 @@ Set-Mailbox [-Identity] [-EmailAddressDisplayNames ] [-EmailAddresses ] [-EnableRoomMailboxAccount ] - [-EndDateForRetentionHold ] + [-EndDateForRetentionHold ] [-EnforcedTimestamps ] [-ExtensionCustomAttribute1 ] [-ExtensionCustomAttribute2 ] @@ -1055,7 +1181,7 @@ Set-Mailbox [-Identity] [-IssueWarningQuota ] [-JournalArchiveAddress ] [-Languages ] - [-LitigationHoldDate ] + [-LitigationHoldDate ] [-LitigationHoldDuration ] [-LitigationHoldEnabled ] [-LitigationHoldOwner ] @@ -1067,6 +1193,7 @@ Set-Mailbox [-Identity] [-MessageCopyForSendOnBehalfEnabled ] [-MessageCopyForSentAsEnabled ] [-MessageCopyForSMTPClientSubmissionEnabled ] + [-MessageTracking ] [-MessageTrackingReadStatusEnabled ] [-MicrosoftOnlineServicesID ] [-ModeratedBy ] @@ -1085,7 +1212,7 @@ Set-Mailbox [-Identity] [-RejectMessagesFromSendersOrMembers ] [-RemoveMailboxProvisioningConstraint] [-RequireSenderAuthenticationEnabled ] - [-ResourceCapacity ] + [-ResourceCapacity ] [-ResourceCustom ] [-RetainDeletedItemsFor ] [-RetentionComment ] @@ -1102,8 +1229,8 @@ Set-Mailbox [-Identity] [-SharingPolicy ] [-SimpleDisplayName ] [-SingleItemRecoveryEnabled ] - [-StartDateForRetentionHold ] - [-StsRefreshTokensValidFrom ] + [-SkipDualWrite] + [-StartDateForRetentionHold ] [-Type ] [-UMDtmfMap ] [-UniqueRecipientsCountLimitLevel ] @@ -1113,16 +1240,15 @@ Set-Mailbox [-Identity] [-UseDatabaseRetentionDefaults ] [-UserCertificate ] [-UserSMimeCertificate ] - [-WindowsEmailAddress ] - [-Confirm] [-WhatIf] + [-WindowsEmailAddress ] [] - ``` +``` -### RemoveComplianceTagHoldApplied +### RemoveDelayReleaseHoldApplied ``` Set-Mailbox [-Identity] - [-RemoveComplianceTagHoldApplied] + [-RemoveDelayReleaseHoldApplied] [-AcceptMessagesOnlyFrom ] [-AcceptMessagesOnlyFromDLMembers ] [-AcceptMessagesOnlyFromSendersOrMembers ] @@ -1136,6 +1262,7 @@ Set-Mailbox [-Identity] [-AuditEnabled ] [-AuditLogAgeLimit ] [-AuditOwner ] + [-AutoArchivingEnabled ] [-BypassModerationFromSendersOrMembers ] [-CalendarRepairDisabled ] [-CalendarVersionStoreDisabled ] @@ -1267,6 +1394,7 @@ Set-Mailbox [-Identity] [-AuditEnabled ] [-AuditLogAgeLimit ] [-AuditOwner ] + [-AutoArchivingEnabled ] [-BypassModerationFromSendersOrMembers ] [-CalendarRepairDisabled ] [-CalendarVersionStoreDisabled ] @@ -1399,6 +1527,7 @@ Set-Mailbox [-Identity] [-AuditEnabled ] [-AuditLogAgeLimit ] [-AuditOwner ] + [-AutoArchivingEnabled ] [-BypassModerationFromSendersOrMembers ] [-CalendarRepairDisabled ] [-CalendarVersionStoreDisabled ] @@ -2298,6 +2427,26 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -AutoArchivingEnabled + +> Applicable: Exchange Online + +This parameter is available only in the cloud-based service. + +{{ Fill AutoArchivingEnabled Description }} + +```yaml +Type: Boolean +Parameter Sets: Identity, ExcludeFromAllHolds, ExcludeFromAllOrgHolds, ExcludeFromOrgHolds, IsExchangeCloudManaged, ProvideConsent, RecalculateInactiveMailbox, RemoveComplianceTagHoldApplied, RemoveDelayHoldApplied, RemoveDelayReleaseHoldApplied, RemoveDisabledArchive, RemoveOrphanedHolds +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -AuxAuditLog > Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Server SE @@ -5024,17 +5173,25 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProvisionedForOfficeGraph +### -ProvideConsent -> Applicable: Exchange Online +> Applicable: Exchange Online, Exchange Online Protection This parameter is available only in the cloud-based service. -This parameter is reserved for internal Microsoft use. +The ProvideConsent switch acknowledges that you understand the implications of removing compliance tag holds from an active mailbox. You don't need to specify a value with this switch. + +This switch is required when using the RemoveComplianceTagHoldApplied switch to remove compliance tag holds from active mailboxes. By providing consent, you acknowledge the following statements: + +- Removing the compliance tag hold might result in the permanent deletion of the mailbox that was previously protected by the hold. +- This action might have legal or compliance implications for your organization. +- Once the hold is removed and content is deleted, the content can't be recovered. + +This switch is not required when removing compliance tag holds from inactive mailboxes. ```yaml Type: SwitchParameter -Parameter Sets: ExcludeFromAllHolds, ExcludeFromAllOrgHolds, ExcludeFromOrgHolds, IsExchangeCloudManaged, RecalculateInactiveMailbox, RemoveDelayHoldApplied, RemoveDelayReleaseHoldApplied, RemoveDisabledArchive, RemoveOrphanedHolds +Parameter Sets: ProvideConsent, RemoveComplianceTagHoldApplied Aliases: Required: False @@ -5044,17 +5201,17 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -PstProvider +### -ProvisionedForOfficeGraph -> Applicable: Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE +> Applicable: Exchange Online -This parameter is available only in on-premises Exchange. +This parameter is available only in the cloud-based service. This parameter is reserved for internal Microsoft use. ```yaml -Type: Boolean -Parameter Sets: Identity +Type: SwitchParameter +Parameter Sets: ExcludeFromAllHolds, ExcludeFromAllOrgHolds, ExcludeFromOrgHolds, IsExchangeCloudManaged, RecalculateInactiveMailbox, RemoveDelayHoldApplied, RemoveDelayReleaseHoldApplied, RemoveDisabledArchive, RemoveOrphanedHolds Aliases: Required: False @@ -5064,25 +5221,17 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ProvideConsent - -> Applicable: Exchange Online, Exchange Online Protection - -This parameter is available only in the cloud-based service. - -The ProvideConsent switch acknowledges that you understand the implications of removing compliance tag holds from an active mailbox. You don't need to specify a value with this switch. +### -PstProvider -This switch is required when using the RemoveComplianceTagHoldApplied switch to remove compliance tag holds from an active mailbox. By providing consent, you acknowledge that: +> Applicable: Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Server SE -- Removing the compliance tag hold may result in the permanent deletion of mailbox that was previously protected by the hold. -- This action may have legal or compliance implications for your organization. -- Once the hold is removed and content is deleted, it cannot be recovered. +This parameter is available only in on-premises Exchange. -This switch is not required when removing compliance tag holds from inactive mailboxes. +This parameter is reserved for internal Microsoft use. ```yaml -Type: SwitchParameter -Parameter Sets: RemoveComplianceTagHoldApplied, ProvideConsent +Type: Boolean +Parameter Sets: Identity Aliases: Required: False @@ -5377,22 +5526,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -RemoveDelayHoldApplied +### -RemoveComplianceTagHoldApplied > Applicable: Exchange Online, Exchange Online Protection This parameter is available only in the cloud-based service. -The RemoveDelayHoldApplied switch specifies whether to remove delay holds on email-related data (generated by Outlook or Outlook on the web) from the mailbox. You don't need to specify a value with this switch. +The RemoveComplianceTagHoldApplied switch specifies whether to remove compliance tag holds from the mailbox. You don't need to specify a value with this switch. -The removal of a hold from a mailbox is temporarily delayed to prevent the accidental purge of content that's no longer affected by the hold. This temporary delay in the removal of the hold is known as a delay hold. To see the hold history on a mailbox, replace `` with the name, email address, or alias of the mailbox, and run this command: `Export-MailboxDiagnosticLogs -Identity -ComponentName HoldTracking`. +Compliance tags (also known as retention labels) can be applied to mailbox items to retain or delete content based on organizational policies. When a compliance tag with a hold action is applied, the ComplianceTagHoldApplied property is set to true to prevent the deletion of mailbox. This switch allows you to remove such holds from the mailbox. -You can use this switch with the GroupMailbox or InactiveMailbox switch to remove delay holds from group mailboxes or inactive mailboxes. -For more information, see [Managing mailboxes on delay hold](https://learn.microsoft.com/purview/ediscovery-identify-a-hold-on-an-exchange-online-mailbox#managing-mailboxes-on-delay-hold). +By default, you can only remove compliance tag holds from inactive mailboxes. To remove compliance tag holds from active mailboxes, you must also use the ProvideConsent switch to acknowledge that you understand the implications of removing the hold. + +For more information about compliance tags and retention, see [Learn about retention policies and retention labels](https://learn.microsoft.com/purview/retention). ```yaml Type: SwitchParameter -Parameter Sets: RemoveDelayHoldApplied +Parameter Sets: RemoveComplianceTagHoldApplied Aliases: Required: True @@ -5402,23 +5552,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -RemoveDelayReleaseHoldApplied +### -RemoveDelayHoldApplied > Applicable: Exchange Online, Exchange Online Protection This parameter is available only in the cloud-based service. -The RemoveDelayReleaseHoldApplied switch specifies whether to remove delay holds on cloud data generated by non-Exchange apps (such as Teams, Forms, and Viva Engage) from the mailbox. Data generated by a non-Exchange cloud-based app is typically stored in a hidden folder in the mailbox. You don't need to specify a value with this switch. +The RemoveDelayHoldApplied switch specifies whether to remove delay holds on email-related data (generated by Outlook or Outlook on the web) from the mailbox. You don't need to specify a value with this switch. -The removal of a hold from a mailbox is temporarily delayed to prevent the accidental purge of content that's no longer affected by the hold. This temporary delay in the removal of the hold is known as a delay hold. To see the hold history on a mailbox, replace `` with the name, email address, or alias of the mailbox, and run this command: `Export-MailboxDiagnosticLogs -Identity -ComponentName SubstrateHoldTracking`. +The removal of a hold from a mailbox is temporarily delayed to prevent the accidental purge of content that's no longer affected by the hold. This temporary delay in the removal of the hold is known as a delay hold. To see the hold history on a mailbox, replace `` with the name, email address, or alias of the mailbox, and run this command: `Export-MailboxDiagnosticLogs -Identity -ComponentName HoldTracking`. You can use this switch with the GroupMailbox or InactiveMailbox switch to remove delay holds from group mailboxes or inactive mailboxes. - For more information, see [Managing mailboxes on delay hold](https://learn.microsoft.com/purview/ediscovery-identify-a-hold-on-an-exchange-online-mailbox#managing-mailboxes-on-delay-hold). ```yaml Type: SwitchParameter -Parameter Sets: RemoveDelayReleaseHoldApplied +Parameter Sets: RemoveDelayHoldApplied Aliases: Required: True @@ -5428,23 +5577,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -RemoveComplianceTagHoldApplied +### -RemoveDelayReleaseHoldApplied > Applicable: Exchange Online, Exchange Online Protection This parameter is available only in the cloud-based service. -The RemoveComplianceTagHoldApplied switch specifies whether to remove compliance tag holds from the mailbox. You don't need to specify a value with this switch. +The RemoveDelayReleaseHoldApplied switch specifies whether to remove delay holds on cloud data generated by non-Exchange apps (such as Teams, Forms, and Viva Engage) from the mailbox. Data generated by a non-Exchange cloud-based app is typically stored in a hidden folder in the mailbox. You don't need to specify a value with this switch. -Compliance tags (also known as retention labels) can be applied to mailbox items to retain or delete content based on organizational policies. When a compliance tag with a hold action is applied, ComplianceTagHoldApplied is set to true to prevent the deletion of mailbox. This switch allows you to remove such holds from the mailbox. +The removal of a hold from a mailbox is temporarily delayed to prevent the accidental purge of content that's no longer affected by the hold. This temporary delay in the removal of the hold is known as a delay hold. To see the hold history on a mailbox, replace `` with the name, email address, or alias of the mailbox, and run this command: `Export-MailboxDiagnosticLogs -Identity -ComponentName SubstrateHoldTracking`. -By default, you can only remove compliance tag holds from inactive mailboxes. To remove compliance tag holds from an active mailbox, you must also use the ProvideConsent switch to acknowledge that you understand the implications of removing the hold. +You can use this switch with the GroupMailbox or InactiveMailbox switch to remove delay holds from group mailboxes or inactive mailboxes. -For more information about compliance tags and retention, see [Learn about retention policies and retention labels](https://learn.microsoft.com/purview/retention). +For more information, see [Managing mailboxes on delay hold](https://learn.microsoft.com/purview/ediscovery-identify-a-hold-on-an-exchange-online-mailbox#managing-mailboxes-on-delay-hold). ```yaml Type: SwitchParameter -Parameter Sets: RemoveComplianceTagHoldApplied +Parameter Sets: RemoveDelayReleaseHoldApplied Aliases: Required: True From fc75c8eac823a925bfebe6aa3f31d90f07681068 Mon Sep 17 00:00:00 2001 From: Chris Davis Date: Tue, 9 Dec 2025 17:15:59 -0800 Subject: [PATCH 6/9] Update Set-Mailbox.md Minor edits to Example 9, 10, and 11 text --- exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md b/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md index bd0544012c..59ec1a1f00 100644 --- a/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md +++ b/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md @@ -1715,21 +1715,21 @@ In Exchange Online, this example removes the delay hold that's applied to Asraf' Set-Mailbox -Identity inactive.user@contoso.com -InactiveMailbox -RemoveComplianceTagHoldApplied ``` -This example removes compliance tag holds from an inactive mailbox. Because the mailbox is inactive, the ProvideConsent switch is not required. +In Exchange Online, this example removes compliance tag holds from an inactive mailbox. Because the mailbox is inactive, the ProvideConsent switch is not required. ### Example 10 ```powershell Set-Mailbox -Identity john.smith@contoso.com -RemoveComplianceTagHoldApplied -ProvideConsent ``` -This example removes compliance tag holds from an active mailbox. The ProvideConsent switch is required to acknowledge that you understand the implications of removing the hold from an active mailbox, which may result in the permanent deletion of content that was previously protected. +In Exchange Online, this example removes compliance tag holds from an active mailbox. The ProvideConsent switch is required to acknowledge you understand the implications of removing the hold from an active mailbox, which might result in the permanent deletion of content that was previously protected. ### Example 11 ```powershell Set-Mailbox -Identity "Sales Team" -GroupMailbox -ExcludeFromAllHolds ``` -This example removes all eligible holds from a group mailbox named "Sales Team". This includes organization-level retention policies, user-level retention policies, compliance tag holds, delay holds, and delay release holds. The switch does not remove eDiscovery holds, litigation holds, or restrictive retention policies. +In Exchange Online, this example removes all eligible holds from a group mailbox named Sales Team. This removal 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. ## PARAMETERS From 8f6de548e134b2d0469603ab8d9b1efca7bc4406 Mon Sep 17 00:00:00 2001 From: Chris Davis Date: Tue, 9 Dec 2025 17:21:53 -0800 Subject: [PATCH 7/9] Update Set-Mailbox.md --- exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md b/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md index 59ec1a1f00..499f8e6513 100644 --- a/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md +++ b/exchange/exchange-ps/ExchangePowerShell/Set-Mailbox.md @@ -1712,24 +1712,24 @@ In Exchange Online, this example removes the delay hold that's applied to Asraf' ### Example 9 ```powershell -Set-Mailbox -Identity inactive.user@contoso.com -InactiveMailbox -RemoveComplianceTagHoldApplied +Set-Mailbox -Identity akia@contoso.com -InactiveMailbox -RemoveComplianceTagHoldApplied ``` -In Exchange Online, this example removes compliance tag holds from an inactive mailbox. Because the mailbox is inactive, the ProvideConsent switch is not required. +In Exchange Online, this example removes compliance tag holds from the specified inactive mailbox. Because the mailbox is inactive, the ProvideConsent switch isn't required. ### Example 10 ```powershell -Set-Mailbox -Identity john.smith@contoso.com -RemoveComplianceTagHoldApplied -ProvideConsent +Set-Mailbox -Identity valeria@contoso.com -RemoveComplianceTagHoldApplied -ProvideConsent ``` -In Exchange Online, this example removes compliance tag holds from an active mailbox. The ProvideConsent switch is required to acknowledge you understand the implications of removing the hold from an active mailbox, which might result in the permanent deletion of content that was previously protected. +In Exchange Online, this example removes compliance tag holds from the specified active mailbox. The ProvideConsent switch is required to acknowledge you understand the implications of removing the hold from an active mailbox, which might result in the permanent deletion of content that was previously protected. ### Example 11 ```powershell Set-Mailbox -Identity "Sales Team" -GroupMailbox -ExcludeFromAllHolds ``` -In Exchange Online, this example removes all eligible holds from a group mailbox named Sales Team. This removal 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. +In Exchange Online, this example removes all eligible holds from the Microsoft 365 Group mailbox named Sales Team. This removal 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. ## PARAMETERS From 574f7c10fa9a1ae0cec0041e2a9d4d90740b375a Mon Sep 17 00:00:00 2001 From: Chris Davis Date: Tue, 9 Dec 2025 18:25:20 -0800 Subject: [PATCH 8/9] Update Set-MailUser.md Edits, parameters in the new ExcludeFromAllHolds parameter set to match observed reality, and added MaxReceiveSize and MaxSendSize to all parameter sets per observed reality. --- .../ExchangePowerShell/Set-MailUser.md | 64 ++++++++++++------- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/exchange/exchange-ps/ExchangePowerShell/Set-MailUser.md b/exchange/exchange-ps/ExchangePowerShell/Set-MailUser.md index ae8fd9bf39..5e01508f3b 100644 --- a/exchange/exchange-ps/ExchangePowerShell/Set-MailUser.md +++ b/exchange/exchange-ps/ExchangePowerShell/Set-MailUser.md @@ -21,7 +21,7 @@ For information about the parameter sets in the Syntax section below, see [Excha ## SYNTAX -### Default +### Identity (Default) ``` Set-MailUser [-Identity] [-AcceptMessagesOnlyFrom ] @@ -149,6 +149,8 @@ Set-MailUser [-Identity] [-EnableLitigationHoldForMigratio [-MailTip ] [-MailTipTranslations ] [-MailboxRegion ] + [-MaxReceiveSize ] + [-MaxSendSize ] [-MessageBodyFormat ] [-MessageFormat ] [-MicrosoftOnlineServicesID ] @@ -188,7 +190,6 @@ Set-MailUser [-Identity] [-ExcludeFromAllHolds] [-ArchiveGuid ] [-BypassModerationFromSendersOrMembers ] [-Confirm] - [-CreateDTMFMap ] [-CustomAttribute1 ] [-CustomAttribute10 ] [-CustomAttribute11 ] @@ -225,6 +226,8 @@ Set-MailUser [-Identity] [-ExcludeFromAllHolds] [-MailTip ] [-MailTipTranslations ] [-MailboxRegion ] + [-MaxReceiveSize ] + [-MaxSendSize ] [-MessageBodyFormat ] [-MessageFormat ] [-MicrosoftOnlineServicesID ] @@ -240,11 +243,8 @@ Set-MailUser [-Identity] [-ExcludeFromAllHolds] [-RemoveMailboxProvisioningConstraint] [-RequireSenderAuthenticationEnabled ] [-ResetPasswordOnNextLogon ] - [-SecondaryAddress ] - [-SecondaryDialPlan ] [-SendModerationNotifications ] [-SimpleDisplayName ] - [-UMDtmfMap ] [-UseMapiRichTextFormat ] [-UsePreferMessageFormat ] [-UserCertificate ] @@ -301,6 +301,8 @@ Set-MailUser [-Identity] [-ExcludeFromAllOrgHolds] [-MailTip ] [-MailTipTranslations ] [-MailboxRegion ] + [-MaxReceiveSize ] + [-MaxSendSize ] [-MessageBodyFormat ] [-MessageFormat ] [-MicrosoftOnlineServicesID ] @@ -377,6 +379,8 @@ Set-MailUser [-Identity] [-ExcludeFromOrgHolds ] [-MailboxRegion ] [-MailTip ] [-MailTipTranslations ] + [-MaxReceiveSize ] + [-MaxSendSize ] [-MessageBodyFormat ] [-MessageFormat ] [-MicrosoftOnlineServicesID ] @@ -453,6 +457,8 @@ Set-MailUser [-Identity] [-RecalculateInactiveMailUser] [-MailboxRegion ] [-MailTip ] [-MailTipTranslations ] + [-MaxReceiveSize ] + [-MaxSendSize ] [-MessageBodyFormat ] [-MessageFormat ] [-MicrosoftOnlineServicesID ] @@ -529,6 +535,8 @@ Set-MailUser [-Identity] [-RemoveComplianceTagHoldApplied] [-MailboxRegion ] [-MailTip ] [-MailTipTranslations ] + [-MaxReceiveSize ] + [-MaxSendSize ] [-MessageBodyFormat ] [-MessageFormat ] [-MicrosoftOnlineServicesID ] @@ -605,6 +613,8 @@ Set-MailUser [-Identity] [-RemoveDelayHoldApplied] [-MailTip ] [-MailTipTranslations ] [-MailboxRegion ] + [-MaxReceiveSize ] + [-MaxSendSize ] [-MessageBodyFormat ] [-MessageFormat ] [-MicrosoftOnlineServicesID ] @@ -681,6 +691,8 @@ Set-MailUser [-Identity] [-RemoveDelayReleaseHoldApplied] [-MailTip ] [-MailTipTranslations ] [-MailboxRegion ] + [-MaxReceiveSize ] + [-MaxSendSize ] [-MessageBodyFormat ] [-MessageFormat ] [-MicrosoftOnlineServicesID ] @@ -756,6 +768,8 @@ Set-MailUser [-Identity] [-RemoveDisabledArchive] [-MailboxRegion ] [-MailTip ] [-MailTipTranslations ] + [-MaxReceiveSize ] + [-MaxSendSize ] [-MessageBodyFormat ] [-MessageFormat ] [-MicrosoftOnlineServicesID ] @@ -830,6 +844,8 @@ Set-MailUser [-Identity] [-RemoveLitigationHoldEnabled] [-MailTip ] [-MailTipTranslations ] [-MailboxRegion ] + [-MaxReceiveSize ] + [-MaxSendSize ] [-MessageBodyFormat ] [-MessageFormat ] [-MicrosoftOnlineServicesID ] @@ -906,6 +922,8 @@ Set-MailUser [-Identity] [-RemoveOrphanedHolds ] [-MailTip ] [-MailTipTranslations ] [-MailboxRegion ] + [-MaxReceiveSize ] + [-MaxSendSize ] [-MessageBodyFormat ] [-MessageFormat ] [-MicrosoftOnlineServicesID ] @@ -1026,7 +1044,7 @@ This example modifies the external email address for the mail user named John Wo Set-MailUser -Identity "John Woods" -ExcludeFromAllHolds ``` -This example excludes the mail user from applicable retention and app retention policies. This includes organization-level retention policies, user-level retention policies, compliance tag holds, delay holds, and delay release holds. The switch does not remove eDiscovery holds, litigation holds, or restrictive retention policies. +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. ## PARAMETERS @@ -1219,7 +1237,7 @@ The ArbitrationMailbox parameter specifies the arbitration mailbox that's used t ```yaml Type: MailboxIdParameter -Parameter Sets: Default +Parameter Sets: Identity Aliases: Required: False @@ -1257,7 +1275,7 @@ This parameter is reserved for internal Microsoft use. ```yaml Type: MultiValuedProperty -Parameter Sets: Default +Parameter Sets: Identity Aliases: Required: False @@ -1668,7 +1686,7 @@ The DomainController parameter specifies the domain controller that's used by th ```yaml Type: Fqdn -Parameter Sets: Default +Parameter Sets: Identity Aliases: Required: False @@ -1730,7 +1748,7 @@ The EmailAddressPolicyEnabled parameter specifies whether to apply email address ```yaml Type: Boolean -Parameter Sets: Default +Parameter Sets: Identity Aliases: Required: False @@ -1786,9 +1804,7 @@ Accept wildcard characters: False This parameter is available only in the cloud-based service. -The ExcludeFromAllHolds switch enables deletion of inactive mail users by removing certain types of holds while preserving compliance requirements. You don't need to specify a value with this switch. - -This switch is used with soft-deleted or inactive mail users. +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. This switch removes the following types of holds: @@ -2140,7 +2156,7 @@ This switch enables the command to access Active Directory objects that aren't c ```yaml Type: SwitchParameter -Parameter Sets: Default +Parameter Sets: Identity Aliases: Required: False @@ -2308,7 +2324,7 @@ Base64 encoding increases the size of messages by approximately 33%, so specify ```yaml Type: Unlimited -Parameter Sets: Default +Parameter Sets: (All) Aliases: Required: False @@ -2339,7 +2355,7 @@ Base64 encoding increases the size of messages by approximately 33%, so specify ```yaml Type: Unlimited -Parameter Sets: Default +Parameter Sets: (All) Aliases: Required: False @@ -2616,7 +2632,7 @@ The RecoverableItemsQuota value must be greater than or equal to the Recoverable ```yaml Type: Unlimited -Parameter Sets: Default +Parameter Sets: Identity Aliases: Required: False @@ -2650,7 +2666,7 @@ The RecoverableItemsQuota value must be greater than or equal to the Recoverable ```yaml Type: Unlimited -Parameter Sets: Default +Parameter Sets: Identity Aliases: Required: False @@ -2921,7 +2937,7 @@ You can add a picture to a mail user by using the Import-RecipientDataProperty c ```yaml Type: SwitchParameter -Parameter Sets: Default +Parameter Sets: Identity Aliases: Required: False @@ -2943,7 +2959,7 @@ You can add a sound file to a mail user by using the Import-RecipientDataPropert ```yaml Type: SwitchParameter -Parameter Sets: Default +Parameter Sets: Identity Aliases: Required: False @@ -3009,7 +3025,7 @@ The SamAccountName parameter (also known as the pre-Windows 2000 user account or ```yaml Type: String -Parameter Sets: Default +Parameter Sets: Identity Aliases: Required: False @@ -3117,7 +3133,7 @@ This parameter is reserved for internal Microsoft use. ```yaml Type: SwitchParameter -Parameter Sets: Default +Parameter Sets: Identity Aliases: Required: False @@ -3149,7 +3165,7 @@ If you use this syntax, you don't need to specify all of the DTMF map values, an ```yaml Type: MultiValuedProperty -Parameter Sets: Default +Parameter Sets: Identity Aliases: Required: False @@ -3252,7 +3268,7 @@ The UserPrincipalName parameter specifies the logon name for the user account. T ```yaml Type: String -Parameter Sets: Default +Parameter Sets: Identity Aliases: Required: False From 207f2d3a2a63b7121a3960e7c86cba82aca06d48 Mon Sep 17 00:00:00 2001 From: Chris Davis Date: Tue, 9 Dec 2025 18:27:16 -0800 Subject: [PATCH 9/9] Update Set-MailUser.md --- exchange/exchange-ps/ExchangePowerShell/Set-MailUser.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exchange/exchange-ps/ExchangePowerShell/Set-MailUser.md b/exchange/exchange-ps/ExchangePowerShell/Set-MailUser.md index 5e01508f3b..a6a29fe421 100644 --- a/exchange/exchange-ps/ExchangePowerShell/Set-MailUser.md +++ b/exchange/exchange-ps/ExchangePowerShell/Set-MailUser.md @@ -1044,7 +1044,7 @@ This example modifies the external email address for the mail user named John Wo Set-MailUser -Identity "John Woods" -ExcludeFromAllHolds ``` -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. +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. ## PARAMETERS