Updating User Principal Name On-Premises for Azure AD Connect
Hello Folks Namaste, Another nugget for updating the UPN for the users, if you are setting up AAD between the on-premise AD and Azure AD you will need to follow the guide to add the custom domain name in AD. Also in addition to that we will need to update the user's UPN by following the below powershell script. In my scenario I had to update the .local UPN Suffix to .com UPN suffix for all the users in the environment. Note: Just test this in a test or dev environment before running on the production environment. Open up ISE or Powershell in a admin mode: $LocalUsers = Get-ADUser -Filter "UserPrincipalName -like '*pacman.local'" -Properties userPrincipalName -ResultSetSize $null $LocalUsers | foreach {$newUpn = $_.UserPrincipalName.Replace("@pacman.local","@pacman.com"); $_ | Set-ADUser -UserPrincipalName $newUpn} Hope this helps if you are trying to update or modify the User's UPN. Cheers, Jimmy