shamilt1
asked on
Powershell script to bulk add email to distribution lists and set as primary for 365 online
Here is the deal.
We have company that would like to add the new domain name and change the primary email address for all users to a new domain they have purchased. It has been added to 365 online. They would also like to do the same for distribution lists.
I have found a script that will do so for mailboxes at the following site :
http://exchangeserverpro.com/powershell-script-create-mailbox-size-report-exchange-server-2010/
This works well in our test env.
Contoso.com also has many distribution lists. Is there another script that will allow me to do the same for distribution lists in bulk? I was only able to find scripts to do so one at a time. See script syntax below.
Set-DistributionGroup "<Distribution Group Name>" -EmailAddresses SMTP:<Primary Email>,<Alias Email>
We have company that would like to add the new domain name and change the primary email address for all users to a new domain they have purchased. It has been added to 365 online. They would also like to do the same for distribution lists.
I have found a script that will do so for mailboxes at the following site :
http://exchangeserverpro.com/powershell-script-create-mailbox-size-report-exchange-server-2010/
This works well in our test env.
Contoso.com also has many distribution lists. Is there another script that will allow me to do the same for distribution lists in bulk? I was only able to find scripts to do so one at a time. See script syntax below.
Set-DistributionGroup "<Distribution Group Name>" -EmailAddresses SMTP:<Primary Email>,<Alias Email>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This helps, saves the step of having to add alias email address in the script, thanks.
- create a new accepted domain for this domain i.e. newname.com
- update the default email address policy with the new domain name (referencing the accepted domain)
- apply the policy to the mailboxes and distribution groups
This would be a preferred method rather than a script because if you use a script when you create new mailboxes they will get the old email address from the default email address policy.
Will.