How to set out of office messages by using Exchange 2010 PowerShell

Article translations Article translations
Article ID: 2667296 - View products that this article applies to.
Expand all | Collapse all

Summary

This article describes how to set out of office messages by using Microsoft Exchange 2010 PowerShell. 

More information

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>

Notes
  • 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:
  1. 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.
  2. Run the following cmdlets in the Exchange PowerShell window:
    1. $internalmessage = get-content internalmessage.txt
    2. $externalmessage = get-content externalmessage.txt
    3. 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


Properties

Article ID: 2667296 - Last Review: June 7, 2013 - Revision: 8.0
Applies to
  • Microsoft Business Productivity Online Dedicated
  • Microsoft Business Productivity Online Suite Federal
Keywords: 
vkbportal226 KB2667296

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com