How to add Distribution Group email alias from CSV in office 365

Hello Forum!
Hope someone can help me troubleshoot this or even let me know if its not possible. But, I used powershell to import distribution groups and set primary emails in Office 365. That worked great, but we have two domains and i would like to add an email alias
to all my DGs for the other domain.
This was my best attempt and its not going well:
Import-CSV "C:\distributionlists.csv" | foreach {Set-DistributionGroup "$_.Name" -EmailAddresses SMTP:$_.PrimarySmtpAddress,$SecondarySmtpAddress}
$_.Name is the column name for my DGs. IE: DL-IT
$_.PrimarySmtpAddress is the column name for my primary email. IE: [email protected]
$_.SecondarySmtpAddress is the column name for my email alias. IE: [email protected]

Hi,
Based on my understanding, the below code should work when your manually run it:
Set-DistributionGroup "DL-accounting"
-EmailAddresses SMTP:<Primary Email>,<Alias Email>
If all those distribution groups have been already created, then use set-distributiongroup command should work. How about first new those distribution group, and then run foreach block to do the loop.
Regards,
Yan Li
Cataleya Li
TechNet Community Support

Similar Messages

  • How I use my group Email addresses from my hard drive?

    How do I use may group email addresses from my hard drive at the .mac.
    At the .mac address book, all the names are listed but not my group list.
    Can you help?

    The address book on the .Mac web site does not support the groups that you have defined in Mac OS X's Address book.

  • How to add new entry of a sandbox solution to Office 365 standard menu

    Hi,
    I have created a sandbox solution for office 365. I want that web part to be accessed from SharePoint Standard menuitem.
    It should be next to Add an App.How could i do that?

    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction
    Id="----"
    GroupId="SiteActions"
    Location="Microsoft.SharePoint.StandardMenu"
    Sequence="2000"
    Title="====Project"
    Description="Create Project">
    <UrlAction Url="~site/SitePages/=-=-=.aspx"/>
    </CustomAction>
    </Elements>

  • How to add left navigation to Custom Master page for Office 365

    Hi,
    I have created a master page using html, it looks good,
    But I could not see the left navigation, which I would like to have.
    below is my html page which converted to a master page:
    <?xml version="1.0" encoding="utf-8"?><!--SPG:
    This HTML file has been associated with a SharePoint Master Page (.master file) carrying the same name.  While the files remain associated, you will not be allowed to edit the .master file, and any rename, move, or deletion operations will be reciprocated.
    -->
    <!DOCTYPE html[]>
    <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
        <head>
            <meta http-equiv="X-UA-Compatible" content="IE=10" >
            <!--CS: Start Page Head Contents Snippet-->
            <!--SPM:<%@Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c"%>-->
            <!--SPM:<%@Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c"%>-->
            <!--SID:00 -->
            <meta name="GENERATOR" content="Microsoft SharePoint" >
            <meta http-equiv="Content-type" content="text/html; charset=utf-8" >
            <meta http-equiv="Expires" content="0" >
            <!--MS:<SharePoint:RobotsMetaTag runat="server">-->
            <!--ME:</SharePoint:RobotsMetaTag>-->
            <!--MS:<SharePoint:PageTitle runat="server">-->
                <!--MS:<asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server">-->
                    <!--MS:<SharePoint:ProjectProperty Property="Title" runat="server">-->
                    <!--ME:</SharePoint:ProjectProperty>-->
                <!--ME:</asp:ContentPlaceHolder>-->
            <!--ME:</SharePoint:PageTitle>-->
            <!--MS:<SharePoint:StartScript runat="server">-->
            <!--ME:</SharePoint:StartScript>-->
            <!--MS:<SharePoint:CssLink runat="server" Version="15">-->
            <!--ME:</SharePoint:CssLink>-->
            <!--MS:<SharePoint:CacheManifestLink runat="server">-->
            <!--ME:</SharePoint:CacheManifestLink>-->
            <!--MS:<SharePoint:PageRenderMode runat="server" RenderModeType="Standard">-->
            <!--ME:</SharePoint:PageRenderMode>-->
            <!--MS:<SharePoint:ScriptLink language="javascript" name="core.js" OnDemand="true" runat="server" Localizable="false">-->
            <!--ME:</SharePoint:ScriptLink>-->
            <!--MS:<SharePoint:ScriptLink language="javascript" name="menu.js" OnDemand="true" runat="server" Localizable="false">-->
            <!--ME:</SharePoint:ScriptLink>-->
            <!--MS:<SharePoint:ScriptLink language="javascript" name="callout.js" OnDemand="true" runat="server" Localizable="false">-->
            <!--ME:</SharePoint:ScriptLink>-->
            <!--MS:<SharePoint:ScriptLink language="javascript" name="sharing.js" OnDemand="true" runat="server" Localizable="false">-->
            <!--ME:</SharePoint:ScriptLink>-->
            <!--MS:<SharePoint:ScriptLink language="javascript" name="suitelinks.js" OnDemand="true" runat="server" Localizable="false">-->
            <!--ME:</SharePoint:ScriptLink>-->
            <!--MS:<SharePoint:CustomJSUrl runat="server">-->
            <!--ME:</SharePoint:CustomJSUrl>-->
            <!--MS:<SharePoint:SoapDiscoveryLink runat="server">-->
            <!--ME:</SharePoint:SoapDiscoveryLink>-->
            <!--MS:<SharePoint:AjaxDelta id="DeltaPlaceHolderAdditionalPageHead" Container="false" runat="server">-->
                <!--MS:<asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server">-->
                <!--ME:</asp:ContentPlaceHolder>-->
                <!--MS:<SharePoint:DelegateControl runat="server" ControlId="AdditionalPageHead" AllowMultipleControls="true">-->
                <!--ME:</SharePoint:DelegateControl>-->
                <!--MS:<asp:ContentPlaceHolder id="PlaceHolderBodyAreaClass" runat="server">-->
                <!--ME:</asp:ContentPlaceHolder>-->
            <!--ME:</SharePoint:AjaxDelta>-->
            <!--MS:<SharePoint:CssRegistration Name="Themable/corev15.css" runat="server">-->
            <!--ME:</SharePoint:CssRegistration>-->
            <!--MS:<SharePoint:AjaxDelta id="DeltaSPWebPartManager" runat="server">-->
                <!--MS:<WebPartPages:SPWebPartManager runat="server">-->
                <!--ME:</WebPartPages:SPWebPartManager>-->
            <!--ME:</SharePoint:AjaxDelta>-->
            <!--CE: End Page Head Contents Snippet-->
            <meta name="viewport" content="width=device-width" >
            <!--DC:The Buzz - Team Site-->
            <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:HtmlDesignFromMaster msdt:dt="string"></mso:HtmlDesignFromMaster>
    <mso:HtmlDesignStatusAndPreview msdt:dt="string">https://rbcom.sharepoint.com/sites/cccdev1/_catalogs/masterpage/Master Page Gallery/team-site-test.html, Conversion successful.</mso:HtmlDesignStatusAndPreview>
    <mso:ContentTypeId msdt:dt="string">0x0101000F1C8B9E0EB4BE489F09807B2C53288F0054AD6EF48B9F7B45A142F8173F171BD10003D357F861E29844953D5CAA1D4D8A3A006E1FBF9840A05D48B1698A21E9B5B94F</mso:ContentTypeId>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
    </mso:CustomDocumentProperties>
    </xml><![endif]-->
        </head>
        <body id="test-100">
            <!--CS: Start Ribbon Snippet-->
            <!--SPM:<%@Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c"%>-->
            <!--SPM:<%@Register Tagprefix="wssucw" TagName="Welcome" Src="~/_controltemplates/15/Welcome.ascx"%>-->
            <!--MS:<SharePoint:SPSecurityTrimmedControl runat="server" HideFromSearchCrawler="true" EmitDiv="true">-->
                <div id="TurnOnAccessibility" style="display:none" class="s4-notdlg noindex">
                    <a id="linkTurnOnAcc" href="#" class="ms-accessible ms-acc-button" onclick="SetIsAccessibilityFeatureEnabled(true);UpdateAccessibilityUI();document.getElementById('linkTurnOffAcc').focus();return
    false;">
                        <!--MS:<SharePoint:EncodedLiteral runat="server" text="&lt;%$Resources:wss,master_turnonaccessibility%&gt;"
    EncodeMethod="HtmlEncode">-->
                        <!--ME:</SharePoint:EncodedLiteral>-->
                    </a>
                </div>
                <div id="TurnOffAccessibility" style="display:none" class="s4-notdlg noindex">
                    <a id="linkTurnOffAcc" href="#" class="ms-accessible ms-acc-button" onclick="SetIsAccessibilityFeatureEnabled(false);UpdateAccessibilityUI();document.getElementById('linkTurnOnAcc').focus();return
    false;">
                        <!--MS:<SharePoint:EncodedLiteral runat="server" text="&lt;%$Resources:wss,master_turnoffaccessibility%&gt;"
    EncodeMethod="HtmlEncode">-->
                        <!--ME:</SharePoint:EncodedLiteral>-->
                    </a>
                </div>
            <!--ME:</SharePoint:SPSecurityTrimmedControl>-->
            <div id="ms-designer-ribbon">
                <!--SID:02 {Ribbon}-->
                <!--PS: Start of READ-ONLY PREVIEW (do not modify) --><div class="DefaultContentBlock" style="background:rgb(0, 114, 198); color:white; width:100%; padding:8px; height:64px;
    overflow:hidden;">The SharePoint ribbon will be here when your file is either previewed on or applied to your site.</div><!--PE: End of READ-ONLY PREVIEW -->
            </div>
            <!--MS:<SharePoint:SPSecurityTrimmedControl runat="server" AuthenticationRestrictions="AnonymousUsersOnly">-->
                <!--MS:<wssucw:Welcome runat="server" EnableViewState="false">-->
                <!--ME:</wssucw:Welcome>-->
            <!--ME:</SharePoint:SPSecurityTrimmedControl>-->
            <!--CE: End Ribbon Snippet-->
            <div id="s4-workspace">
                <div id="s4-bodyContainer">
                    <header>
                   <!----> <div data-name="ContentPlaceHolderMain">
                        <!--CS: Start PlaceHolderMain Snippet-->
                        <!--SPM:<%@Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
                        <!--MS:<SharePoint:AjaxDelta ID="DeltaPlaceHolderMain" IsMainContent="true" runat="server">-->
                            <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderMain" runat="server">-->
                            <!--ME:</asp:ContentPlaceHolder>-->
                        <!--ME:</SharePoint:AjaxDelta>-->
                        <!--CE: End PlaceHolderMain Snippet-->
                    </div>
                </div>
            </div>
        </body>
    </html>
    Any suggestions here....
    Thanks in Advance.
    PMMR

    Hi,
    The Navigation control can be added into your HTML page in the Snippet Gallery:
    The two links below about how to create HTML master page and adding snippets needed into it for your reference:
    http://borderingdotnet.blogspot.jp/2012/12/how-to-create-html-masterpage-for.html
    http://msdn.microsoft.com/en-us/library/office/jj822370(v=office.15).aspx
    Feel free to reply if there still any question.
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • How can I add an iCloud email alias?, How can I add an iCloud email alias?

    I'm trying to figure out how to add an iCloud email alias but can't figure out where or how to. Please help.

    You do it on the iCloud website at http://www.icloud.com , in the Mail section. Please see this Help page:
    http://help.apple.com/icloud/#mm6b1a490a

  • How do I create a Group email list from my contacts??

    I can't figure out how to create a Group email list from my contacts on my iPhone??

    I thought that was how I did it before ( a year ago ) but the group is created in my Email software but the group won't synch to my phone?! However it will synch randomly - i.e. singular new emails synch from my phone to my computer, but I am not noticing the computer transferring data to my phone...same with calendar...hmmm, maybe that's the problem - issue synching anything entered into my computer first...anyone hear of this? It seems that this started about a month ago, I had to restore my phone and it would not restore with the most recent backup, so I had to go back a couple of back ups... since it has been glitchy! HELP!

  • How do I send group emails from my iPad? They work fine from my MacBook but not the iPad.

    How do I send group emails from an iPad? They work fine on my MacBook but not my iPad.

    You need a third party app to do that. Look at Mail Shot or Group Email in the app store. You cannot do it with the built in mail app and the contacts app in iOS 5 without a third party app.

  • How do I set up email addresses from my address book?

    How do I set up email addresses from my address book?

    I'm not sure exactly what you are asking.  If you are coming from pre-Mountain Lion, then Address Book has changed to Contacts.
    Open Contacts.
    Select an Account in the group list, if you want the contact in a specific group. If Groups aren't showing, you can display them from the View menu.
    Click the Add card button ( + ).
    Enter the information for the contact.
    If you need multiple entries for a particular field type, a new blank entry will show up below the one you are adding.
    If you need other fields, use the Card menu to Add a new field type.
    If you want to change the default fields available when you create a new card, choose Edit Template…
    If you have sent emails to someone and you want to get that address to add to a Contact, use the Previous Recipients command in the View menu in Mail.
    If you need to add a new Group, hover the cursor over the account name, and a + button will appear. Click it.

  • How do you delete an email address from your iPhone that's not in your contacts?

    How do you delete an email address from your iPhone that's not in your contacts?

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • How can I remove an email address from one apple account and associate it with another?

    I created an appleID account to use with the mac AppStore without realising i previously had an appleID account from my first iPod touch.
    Now with OSX 10.8 I want to use the email address from the old account with the new account for Messages.app without having to manage 2 logins.
    I've followed the steps found on the support page http://support.apple.com/kb/HE68 under the section "How to add an additional email address that is already associated with another Apple ID" but each time I attempt to add the removed email address from the new account to the old account the input box shows the error: Email address is already verified for another Apple ID.
    Has anyone else experienced this problem and found a solution?

    Click here and request assistance.
    (80443)

  • How to create a group of contact from a multi-selection of mails in a mailbox to answer to all senders?

    How to create a group of contact from a multi-selection of mails in a mailbox to answer to all senders?

    Use Mail Scripts. Its Add Addresses function will collect all the addresses from all selected messages and allow you to select the ones you want to add and allow you to create groups as you go.

  • How to add administrator group to weblogic user

    Hi All,
    How to add Administrator Group to weblogic user if weblogic user is accidently removed from Administrator group.
    Weblogic version is 10.0.1.0.
    Thank you in Advance!!!
    Cheers,
    Ankur

    http://docs.oracle.com/cd/E21764_01/apirefs.1111/e13952/taskhelp/security/ManageUsersAndGroups.html

  • How to add photo to email signature

    How to add photo to email signature?

    Are you checking your email from our website or are you using an email program such as Outlook or Thunderbird?
    Anthony_VZ
    **If someones post has helped you, please acknowledge their assistance by clicking the red thumbs up button to give them Kudos. If you are the original poster and any response gave you your answer, please mark the post that had the answer as the solution**
    Notice: Content posted by Verizon employees is meant to be informational and does not supersede or change the Verizon Forums User Guidelines or Terms or Service, or your Customer Agreement Terms and Conditions or plan

  • Does anyone know how to add my AOL email account?

    When I click on the AOL icon on "Select an email account to add" and follow the prompts, I get a message saying "system is unable to support the request".  Does anyone have any suggestions?

    Thanks.  It worked once I stopped trying to use the AOL icon and set it up as “Other Email”.
    From: Wildman
    Sent: Thursday, March 22, 2012 1:36 AM
    To: <personal information deleted per TOS>
    Subject: Re: Does anyone know how to add my AOL email account? - Re: Does anyone know how to add my AOL email account?
               Re: Does anyone know how to add my AOL email account?
                created by Wildman in DROID RAZR by Motorola - View the full discussion
    Message was edited by: Verizon Moderator

  • Is there a way to establish when a distribution group email address last received a message?

    We currently use Exchange 2007 but are planning to migrate to 2013 soon. As part of the prep for migration I want to tidy things up, and part of this tidy up is to remove unused distribution groups.
    The user community is one that refuses to let go of anything (our retention policy is keep everything, forever), so if I ask them if they still need these groups the answer will be yes for all.
    So, is there any way I can pull a report of the last time the email addresses associated with these groups were used?

    Apart from above, once you find unused users list, You can try below steps to remove them in exchange 2007 : Simply open the group from the recipient configuration, Distribution group node (or from Active Directory Users and Computers). Select the members
    tab and select the user and click the X.
    You can take a look at this helpful article to gather more information about this concern : http://windowsitpro.com/exchange-server/exchange-2007-distribution-groups
    Furthermore, when you are preparing to migrate database from exchange 2007 to 2013, you can have a look at this proficient resource available at (http://www.exchangemigrationtool.com/) that would also be
    a fantastic approach for a secure migration of mailbox data between two exchange server.

Maybe you are looking for

  • Can my family in Australia buy music for me?

    I live in the UK, with a UK passport, payment card and address. I have family on a working VISA in Australia. They have an Australian card and current address but they are UK nationals. There is some music I'd like on the Australian iTunes. If she wa

  • HP Officejet Pro L7590 All in ONe

    When I hit scan button the display reads:  "No scan options" Refer to device documentation to troubleshoot."   The documentation does not contain additional information.  

  • Generate CSR using API problem??

    Hi all , I have this piece of code below using JDK 1.3 and BouncyCastel Provider //some other import ... i am using bouncyCastle Provider import javax.crypto.Cipher; import org.bouncycastle.jce.PKCS10CertificationRequest; import org.bouncycastle.asn1

  • How can i get back Videos?

    I am not finding the Videos icon anymore, where u see last seen video, youtube videos and all videos, can anyone assist me in a way to get it back, I now have to go file manager and go directly where to videos are located then open. Nothing is as it

  • Aspect ratio of pictures in BOOK for iphoto8- square

    I seem to be getting a strange aspect ratio in the new iphoto book. it seems to be cropping my landscape pictures into more of a 4x3 or box format. This did not used to happen in the old iphoto. It is extremely annoying as all pictures get cropped ou