Active Directory Script – update all AD names to match DisplayName

Get-ADUser -Filter * -searchbase “OU LOCATION” -Property DisplayName | %{
$_ | Rename-ADObject -NewName $_.DisplayName
}

If the CN object in Active Directory does not match the DisplayName then use the above script

Share
Ryan Wilson
Azure and Office 365 Technical Architect | Microsoft Certified Solutions Associate: Office 365 | Microsoft Certified: Azure Solutions Architect Expert | Microsoft Certified Solutions Expert: Productivity | Microsoft 365 Certified: Enterprise Administrator Expert | Microsoft 365 Certified: Messaging Administrator Associate

Leave a Reply

Your email address will not be published. Required fields are marked *