add secundair smtp adress to mailpublicfolder exchange online

Welcome Forums General PowerShell Q&A add secundair smtp adress to mailpublicfolder exchange online

This topic contains 2 replies, has 3 voices, and was last updated by

 
Participant
1 year, 6 months ago.

  • Author
    Posts
  • #70053

    Participant
    Points: 0
    Rank: Member

    Dear people,

    I try to add a secundair smtp address to a public folder emailbox.

    But it is not working.

    i tried the following thing

    $PF = Get-MailPublicFolder “Offerte”
    $PF.EmailAddresses += “dgn-offerte@010notaris.nl”
    $PF | Set-MailPublicFolder 
    

    but i get the follwoing message
    WARNING: the command completed succesfully but no setting of Offerte have been modified

  • #70092

    Keymaster
    Points: 1,644
    Helping HandTeam Member
    Rank: Community Hero

    It would probably be easier to use Set-MailPublicFolder to set the entire collection of email addresses that you want. E.g., create an array with the existing one(s) as well as your new one, and then pass that to -EmailAddresses. But you also need to provide an email type identifier, as described at https://technet.microsoft.com/en-us/library/bb123707(v=exchg.160).aspx.

  • #70101

    Participant
    Points: 1
    Rank: Member

    Hi Jeremy-Smit,

    first, you should properly remove any real e-mail addresses from the code when posting. The reason is obvious I think 🙂

    I would suggest to change the code to:

    $PF = Get-MailPublicFolder "Offerte"
    $PFEmailAddresses = "SMTP:dgn-offerte@010notaris.nl"
    Set-MailPublicFolder -Identity $PF -EmailAddresses $PFEmailAddresses
    

The topic ‘add secundair smtp adress to mailpublicfolder exchange online’ is closed to new replies.