Forum Discussion

Roger Roger's avatar
Roger Roger
Iron Contributor
Jan 08, 2020

Alias

Hi Experts

I am using exchange 2010 hybrid environment, i have distribution groups in Exchange onprem and Exchange online. From powershell syntax how can i know if it is onprem or oncloud.

 

2. for onprem distribution group lets say i have a group onpremDL@contoso.com and its alias is onpremDL, i want to create another Alias to this, how can i create another alias. i dont see any option to add addition alias, can i add additional email address will it work for me, how can i do this from shell.

 

3. i have same requirement for cloudDL, experts guide me.

  • HelloRoger Roger ! 

     

    There are several ways to get this done. 
    I'll give you one GUI based method and one PowerShell /Exchange Shell method 

     

    GUI Version: 

    1. Open EMC ( Exchange Management Console ) on your Exchange server
    2. Go to "Recipient Configuration-->Distribution Group" 
    3. Right click your distribution group and choose "properties" 
    4. Choose the "E-mail addresses" tab 
    5. Click add



    Shell method:

    1. Open up EMS ( Exchange Management Shell ) 
    2. Type the following commands note that my groups name is sales, replace sales with your own group. Also replace "alias@domain.com" with your wished alias.

    $Group = Get-DistributionGroup "sales"

    $Group.EmailAddresses +="Alias@domain.com" 

    Set-DistributionGroup -Identity "sales" -EmailAddresses $Group.EmailAddresses

     

    The 3 above commands will do the following

    1: Gets the Distribution group and saves it to a variable called $Group

    2: It gets the current email addresses of the group and then adds "alias@domain.com" to that list in the variable

    3: Sets the groups email addresses using the list from the $Group variable. 

     

    Let me know if this helps!
    Feel free to mark my reply as a solution if it did

     

    If you have more questions, let me know! 

     

    Kind Regards
    Oliwer Sjöberg

Resources