Link to home
Start Free TrialLog in
Avatar of paologiorgio
paologiorgioFlag for Ireland

asked on

Powershell Scripts for Office 365 Migartion

I am migrating 18 domains from one office365 Tenancy to another.
Let's call them T1 [source] and T2 [destination]. I have migrated smaller domains first to test and have ran into some changes which are fine with only 3-4 users per domain, but when i have 200 user domain migration i will need some automation and good Powershell scripts to help. To date I have gathered a lot of useful scripts, but am not sorely missing the following... Any ideas where or what i can do to get them ?

Remove Vanity domain from any user with it as an alias or Primary domain.#

Bulk Purge all "deleted contacts" or at least bulk delete from CSV.

Assign Vanity domain from CSV, ideally setting as either Primary or Alias.
ASKER CERTIFIED SOLUTION
Avatar of Vasil Michev (MVP)
Vasil Michev (MVP)
Flag of Bulgaria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of paologiorgio

ASKER

Vasil,

Thanks for Reply.

By deleted contacts i mean, i deleted the contact asmith@contoso.com in T2 and they were no longer present in contacts in exchange admin. I thought that it was gone for good.

I then went to add the vanity domain contoso.com (recently verified on T2) to the user asmith (a user with a license) and it threw up the error about the name already exists.

I presumed the contacts had not flushed and went about purging contacts. When i searched for mailcontact containing "asmith" i found my culprit, using the unique ID i forced deletion.

I was then able to add domain and turn my contact essentially into a mailbox.
Hm, maybe you can try deleting it from WAAD instead of EO, using the Remove-MSOLContact cmdlet. Probably when you remove it from Exchange first it waits for replication, thus the delay you experienced.

Edit: just deleted a test contact from WAAD and immediately created another one with the same email address, no issues.

Repeated the same procedure by deleting the contact from EO instead, again no issues after I recreated it. Strange...