This article describes how to set out of office messages by using Microsoft Exchange 2010 PowerShell.
To set up out of office messages by using Exchange 2010 PowerShell, run the following cmdlet in the Exchange PowerShell window to configure detailed information about the out of office message setup:
Set-MailboxAutoReplyConfiguration <alias> -AutoReplyState enabled -ExternalAudience all -InternalMessage <Message to internal senders> -ExternalMessage <Message to external senders>
- The StartTime and EndTime parameters can be used if the AutoReplyState setting is set to Scheduled.
- In this cmdlet, the placeholder <alias> represents the target user's alias. The placeholder <Message to internal senders> represents the message that is generated when you receive email messages from internal senders. And the placeholder <Message to external senders> represents the message that is generated when you receive email messages from external senders.
If you want to have an HTML signature instead of a plain text signature, you must use a text file to load the message. Note
If the out of office message can be added as plain text, the severity of the service request cannot be raised to Severity A.
You cannot use HTML characters in Exchange PowerShell directly. Therefore, the HTML characters must be imported through a text file. To do this, follow these steps:
- Create an internalmessage.txt document and an externalmessage.txt document that contain the requested messages.
Note The placeholders internalmessage and externalmessage represent the names of the text files that contain the out of office messages.
- Run the following cmdlets in the Exchange PowerShell window:
$internalmessage = get-content internalmessage.txt
$externalmessage = get-content externalmessage.txt
Set-MailboxAutoReplyConfiguration <alias> -AutoReplyState enabled -ExternalAudience <none/all/known> -InternalMessage "$internalmessage" -ExternalMessage "$externalmessage"
Sometimes, it is desirable to set up both mail forwarding and out of office messages, such as when people have left the company or are on long-term leave. If you enable mail forwarding, you must set the DeliverToMailboxAndForward
attribute to True
for the out of office message to occur. If this attribute is not set to True
, email messages that are sent to the mailbox will be forwarded before they reach the mailbox and will therefore never trigger the out of office message response. To set the DeliverToMailboxAndForward
attribute to True
, run the following cmdlet:
Set-Mailbox <alias> -ForwardingAddress <recipient> -DeliverToMailboxAndForward $True
Article ID: 2667296 - Last Review: June 7, 2013 - Revision: 8.0
- Microsoft Business Productivity Online Dedicated
- Microsoft Business Productivity Online Suite Federal