Script Download:FixDuplicateUserPrincipalName.zip
http://gallery.technet.microsoft.com/scriptcenter/Fix-Duplicate-User-d92215ef

This script is used to fix duplicate user principal name for on-premises Active Directory users.

This script enables you to export Active Directory users with duplicated user principal names. After correcting the attributes for these users, you can use this script to import them to your on-premises Active Directory.

image image
image

You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery