BULK CHANGING UPN AND PRIMARY SMTP USING POWERSHELL

%3CLINGO-SUB%20id%3D%22lingo-sub-885013%22%20slang%3D%22en-US%22%3EBULK%20CHANGING%20UPN%20AND%20PRIMARY%20SMTP%20USING%20POWERSHELL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-885013%22%20slang%3D%22en-US%22%3E%3CP%3EScenario%3A%20100%20USERS%20was%20provisioned%20with%20UPN%20and%20Primary%20SMTP%20%3CSTRONG%3Econto.onmicrosoft.com%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20do%20we%20bulk%20change%20100%20UPN%20and%20Primary%20SMTP%20to%3CSTRONG%3E%20contoso.com%20%3C%2FSTRONG%3Evia%20powershell%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-885013%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-885241%22%20slang%3D%22en-US%22%3ERe%3A%20BULK%20CHANGING%20UPN%20AND%20PRIMARY%20SMTP%20USING%20POWERSHELL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-885241%22%20slang%3D%22en-US%22%3E%3CP%3EBoth%20the%20Set-MsolUserPrincipalName%20and%20Set-AzureADUser%20cmdlets%20allow%20you%20to%20do%20that%2C%20are%20you%20running%20into%20any%20error%20or%20something%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Super Contributor

Scenario: 100 USERS was provisioned with UPN and Primary SMTP conto.onmicrosoft.com

 

How do we bulk change 100 UPN and Primary SMTP to contoso.com via powershell?

1 Reply
Highlighted

Both the Set-MsolUserPrincipalName and Set-AzureADUser cmdlets allow you to do that, are you running into any error or something?