Update all users alias with new domain

Bhasker Chittanoori 0 Reputation points

I am not expert with PS. I am trying to remove primary domain from tenantA to TenantB. For that i have chnaged all users email and upn domains to default oldcompay.onmicrosoft.com. But now to completely remove the primary domain, the other dependency like update alias and skype addresses for all users.

Can someone help me with a script to update alias domain. Attached is the screenshot for ref

A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,139 questions
0 comments No comments
{count} votes