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 21 hours 24 minutes ago
May 21st, 2015 6:03am

Take a look at this link, it shoudl have all the information you nee.d

http://itnaw.blogspot.com/2014/01/powershell-text-formatting-for-out-of.html

Free Windows Admin Tool Kit Click here and download it now
May 21st, 2015 11:12am

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

Other recent topics Other recent topics