"A positional parameter cannot be found that accepts argument.." error with auto-reply message text containg quotation marks


  • Hello Folks,

    I tried to set OoO message for a mailbox in EMS, but I'm getting error in all the cases. The problem is that my OoO message contain several href's with quotation marks like:

    ...please visit <a href="https://whatever.domain/" target="_blank" rel="noopener">Get This One</a>...

    I tried the followings:

    1. Whole HTML code enclosed between <html><body>...</body></html>

    2. Tried to create variable like $ooo_text = get-content c:\whatever.txt, then invoked in Set-MailboxAutoReplyConfiguration

    3. Tried to use the message text directly within Set-MailboxAutoReplyConfiguration as param for -InternalMessage "<html><body>...</body></html"

    4. Tried the trick with @"<html><body>...</body></html>"@ as well.

    Actually I'm out of any other idea...

    Wednesday, March 21, 2018 4:06 PM

All replies

  • You need to escape the quotes, as in use double quotes:

    Set-MailboxAutoReplyConfiguration WC -InternalMessage "...please visit <a href=""https://whatever.domain/"" target=""_blank"" rel=""noopener"">Get This One</a>..."
    Get-MailboxAutoReplyConfiguration WC
    ExternalMessage                  :
    InternalMessage                  : <html>
                                       ...please visit <a href="https://whatever.domain/" target="_blank" rel="noopener">
                                       Get This One</a>...

    Wednesday, March 21, 2018 8:52 PM
  • Hi Pandinvs,

    I'm just writing to check how's everything going? If you have any questions or needed further help on this issue, please feel free to post back. If the issue has been resolved, please mark the helpful replies as answers, this will make answer searching in the forum easier and be beneficial to other community members as well. Thanks for your understanding.

    Best Regards,
    Niko Cheng

    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Thursday, March 29, 2018 1:28 AM