User Tools

Site Tools


playground:microsoft_365:exchange_online:office_365_tenant_to_tenant_migrations

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
playground:microsoft_365:exchange_online:office_365_tenant_to_tenant_migrations [2021/10/29 22:58] – [Distribution Group Migrations] admintomiplayground:microsoft_365:exchange_online:office_365_tenant_to_tenant_migrations [2021/10/29 23:16] (current) – [Distribution Group Migrations] admintomi
Line 25: Line 25:
 </code> </code>
  
-Exporting distribution lists members+Exporting distribution lists members. I borrowed this from Internet. Problem is that this script does not output nice .csv file, needs to be redesigned.
 <code> <code>
  
Line 44: Line 44:
  
 </code> </code>
 +
 +Lets say you add headers to file produced on previous script for example "DisplayName,PrimarySMTPAddress,User,UserPrimarySMTP,Mailboxtype" (Add first line on file)
 +
 +You can import members to new tenant with following command
 +
 +<code>
 +Import-Csv C:\temp\distributiongroup_importmembers.csv | foreach {
 +Add-DistributionGroupMember -Identity $_.DisplayName -Member $_.UserPrimarySMTP
 +}
 +
 +</code>
 +
 +Yet again pay attention to UPN if it needs to be changed before importing.
  
  
playground/microsoft_365/exchange_online/office_365_tenant_to_tenant_migrations.1635537520.txt.gz · Last modified: 2021/10/29 22:58 by admintomi