Commands › Exchange Online

Set-MailboxAutoReplyConfiguration

Exchange Online ExchangeOnlineManagement Set-*

Configure Automatic Replies settings for a specific mailbox.

Quick start script

# Set-MailboxAutoReplyConfiguration — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-MailboxAutoReplyConfiguration
$before | Format-List

# 3. Make the change (dry run first)
Set-MailboxAutoReplyConfiguration -Identity <MailboxIdParameter> -WhatIf
Set-MailboxAutoReplyConfiguration -Identity <MailboxIdParameter>

# 4. Verify and diff
$after = Get-MailboxAutoReplyConfiguration
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Set-MailboxAutoReplyConfiguration [-Identity] <MailboxIdParameter>
 [-AutoDeclineFutureRequestsWhenOOF <Boolean>]
 [-AutoReplyState <OofState>]
 [-Confirm]
 [-CreateOOFEvent <Boolean>]
 [-DeclineAllEventsForScheduledOOF <Boolean>]
 [-DeclineEventsForScheduledOOF <Boolean>]
 [-DeclineMeetingMessage <String>]
 [-DomainController <Fqdn>]
 [-EndTime <DateTime>]
 [-EventsToDeleteIDs <String[]>]
 [-ExternalAudience <ExternalAudience>]
 [-ExternalMessage <String>]
 [-IgnoreDefaultScope]
 [-InternalMessage <String>]
 [-OOFEventSubject <String>]
 [-StartTime <DateTime>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (18)

ParameterTypeRequiredWhat it controls
-Identity MailboxIdParameter yes The Identity parameter specifies the mailbox that you want to modify. You can use any value that uniquely identifies the mailbox. For example:
-AutoDeclineFutureRequestsWhenOOF Boolean This parameter is functional only in the cloud-based service.
-AutoReplyState OofState The AutoReplyState parameter specifies whether the mailbox is enabled for Automatic Replies. Valid values are:
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-CreateOOFEvent Boolean This parameter is functional only in the cloud-based service.
-DeclineAllEventsForScheduledOOF Boolean This parameter is functional only in the cloud-based service.
-DeclineEventsForScheduledOOF Boolean This parameter is functional only in the cloud-based service.
-DeclineMeetingMessage String This parameter is functional only in the cloud-based service.
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-EndTime DateTime The EndTime parameter specifies the end date and time that Automatic Replies are sent for the mailbox. You use this parameter only when the AutoReplyState parameter is set to Scheduled, and the value of this...
-EventsToDeleteIDs String[] This parameter is functional only in the cloud-based service.
-ExternalAudience ExternalAudience The ExternalAudience parameter specifies whether Automatic Replies are sent to external senders. Valid values are:
-ExternalMessage String The ExternalMessage parameter specifies the Automatic Replies message that's sent to external senders or senders outside the organization. If the value contains spaces, enclose the value in quotation marks (").
-IgnoreDefaultScope SwitchParameter The IgnoreDefaultScope switch tells the command to ignore the default recipient scope setting for the Exchange PowerShell session, and to use the entire forest as the scope. You don't need to specify a value with this switch.
-InternalMessage String The InternalMessage parameter specifies the Automatic Replies message that's sent to internal senders or senders within the organization. If the value contains spaces, enclose the value in quotation marks (").
-OOFEventSubject String This parameter is functional only in the cloud-based service.
-StartTime DateTime The StartTime parameter specifies the start date and time that Automatic Replies are sent for the specified mailbox. You use this parameter only when the AutoReplyState parameter is set to Scheduled, and the value of...
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.