Set-MailboxAutoReplyConfiguration

Glenn Maxwell 12,001 Reputation points
2025-01-10T06:58:14.98+00:00

Hi All

I want to set an AutoReply on a mailbox. While I can set the AutoReply using the syntax below, it does not format the message as I require. Specifically, I need the AutoReply to appear in 5 lines, as shown in the screenshot. Using the current syntax, the message appears in a single line.

Could you please guide me on how to achieve this?

$intmsg = get-content C:\temp\internalmessage.txt  
$extmsg = get-content C:\temp\externalmessage.txt    
Set-MailboxAutoReplyConfiguration -Identity "user1@contoso.com" -AutoReplyState Scheduled -StartTime "01/10/2025 00:00:00" -EndTime "02/10/2025 23:59:00" -InternalMessage "$intmsg" -ExternalMessage "$extmsg"  

mesg1

Microsoft Exchange Online
Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,399 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,683 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,747 questions
Microsoft Exchange
Microsoft Exchange
Microsoft messaging and collaboration software.
620 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce Jing-MSFT 7,630 Reputation points Microsoft Vendor
    2025-01-10T09:55:34.31+00:00

    Hi,@Glenn Maxwell

    Thanks for posting your question in the Microsoft Q&A forum.

    Based on your description, I have performed the relevant tests and it is indeed not possible to split the text into 5 lines, as you said.

    User's image

    I have tested this several times and have found that Powershell reads the text in the format it is in with no problems.

    User's image

    I've noticed in OWA that the auto-reply text is not populated as expected.

    User's image

    IMO, it is not possible to fulfill your request at this time, you can make formatting changes in OWA's autoresponder.

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.