header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Change Primary SMTP address on Distribution Groups
Last Post 28 Jun 2010 02:32 PM by kishoyian. 3 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
AlexxicoUser is Offline
New Member
New Member
Posts:1
Avatar

--
22 Apr 2009 11:03 AM

    Hi I'm hoping someone could give us a hand with a powershell script.

    We are trying to change the Primary SMTP address on all distribution groups to the secondary address.

    We've turn off the flag for emailaddresspolicyenabled so this shouldn't be a problem.

    Were able to list the SMTP addresses but not sure how to change. Any help would be greatly appreciated Get-DistributionGroup -Identity "Exch Test" | list Emailaddresses

    Thanks,

    Shay LevyUser is Offline
    PowerShell MVP, Admin
    Veteran Member
    Veteran Member
    Posts:1362
    Avatar

    --
    23 Apr 2009 06:17 AM
    Get-DistributionGroup | foreach {

    # get the first non primary smtp address
    $new = $_.emailAddresses | where {!$_.IsPrimaryAddress} | select -first 1

    # make it the primary smtp address
    Set-DistributionGroup $_ -EmailAddressPolicyEnabled:$false -PrimarySmtpAddress $new

    }


    Shay Levy
    Windows PowerShell MVP
    http://PowerShay.com
    PowerShell Community Toolbar
    Twitter: @ShayLevy
    InacioFUser is Offline
    New Member
    New Member
    Posts:1
    Avatar

    --
    05 Apr 2010 09:42 AM
    I have a similar issue but is not to change but to add smtp addresses to existing Distribution Lists maintaining existing alias and adding new domain and set it as primary.
    For example in a DL where it has "group_hr@domain.com" and add "group_hr@newdomain.com" and set has primary.
    this is to be done in all DL where DL is mail enabled with @domain.com

    Thanks in advance for any replies
    kishoyianUser is Offline
    New Member
    New Member
    Posts:1
    Avatar

    --
    28 Jun 2010 02:32 PM
    I also have a similar need to be able to add smtp addresses to existing Distribution Lists maintaining existing alias and adding new domain and set it as primary. For example in a DL where it has "group_hr@olddomain.com" and add "group_hr@newdomain.com" and set it as primary. This is to be done in all DL where DL is mail enabled with @olddomain.com.
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer