Set-Mailboxautoreplyconfiguration LINE BREAK issue

Hi all, I'm trying to set up an auto reply message for a mailbox, but I'm unable to include the break lines.

I tryed several methods:


1. just pasting the text:

[PS] C:\Windows\system32>Set-MailboxAutoReplyConfiguration -identity testexchange -ExternalMessage "This is an auto reply message.
>> this is the second line"
>>

i receive a mail like this:

This is an auto reply message.this is the second line


2. with a variable in power shell and adding exchange 2013 snapin:

PS C:\> $reply = "first line
>> second line"
>>
PS C:\> Add-PSSnapin Microsoft-Exchange.Management.Powershell.snapin
PS C:\> Set-MailboxAutoReplyConfiguration -Identity testexchange -ExternalMessage $reply

Again, i receive a mail like: 

first linesecond line

3. I tried fetching the text from a file:

[PS] C:\>$reply=Get-Content reply.txt

[PS] C:\>Set-MailboxAutoReplyConfiguration -Identity testexchange -ExternalMessage $reply

4. I also tried with a powershell script:
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.snapin

$x = @"

this is the autoreply
second line
third line

"@

set-mailboxautoreplyconfiguration -identity testexchange -externalmessage $x

again, i receive a mail like: this is the autoreplysecond linethird line

Thank you all,


  • Edited by hegokkh Thursday, May 21, 2015 10:05 AM
May 21st, 2015 10:01am

Thank you for the answer Hinte, but I already tried all this and it does not work.
Free Windows Admin Tool Kit Click here and download it now
May 22nd, 2015 4:34am

Hi,

I test the following method in my lab, it works fine. Use html language to edit the reply message and use </br> to add new line.

$reply = "<html><head></head><body><p>first line</br>second line</p></body></html>"

Set-MailboxAutoReplyConfiguration -Identity UserAccount -AutoReplyState enabled -ExternalMessage $reply

Best Regards.

May 22nd, 2015 4:59am

Hi, this sounds good, I'm to try. thanks for the reply.
Free Windows Admin Tool Kit Click here and download it now
May 26th, 2015 5:15am

Hi, thank you very much for your help, I never thought about using html, but it really did worked as you said, thank you!

have a nice day,

May 27th, 2015 2:18am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics