Date: 2/13/2025
Author: Shaun Eagle
Summary/Issue: How to update Active Directory when a user's name needs to be changed due to error or due to a legal name change.
Ticket reference: How to Update Email Addresses to the New KeeleyConstruction Format | Knowledge Base | Keeley Companies
Resolution:
Open Remote Desktop Connection, set Computer to az-itmanagement and click Connect.
Log in with your administrator email and password.
Search for Active Directory and click Active Directory Users and Computers.
Within Active Directory, on the left panel, click the arrow next to Users by Domain to expand.
Here is a guide to know which domain is for which company:
bestboxstorage.com - Best Box Storage
kdgi.com - Keeley Properties
keeleycompanies.com - Keeley Companies
keeleyrs.com - Keeley Restoration
lkeeley.com - Keeley Construction
millingservices.com - Milling Services
TestOU - Test Domain
Select the domain that contains the user you are looking for. In this example, we will use keeleyrs.com.
Left-click the user you need, wait a few seconds and left-click again to manually change the entry.
Click elsewhere to deselect the user. Make sure the advanced options are checked in the View menu.
Right-click on the user and click Properties.
Under the General tab, change the name information including the email if applicable. Click Apply.
Next, click the Account tab and change the User login name for both entries. Click Apply.
Click the Attribute Editor tab and under Attributes scroll down to proxyAddresses. Double click on proxyAddresses.
Refer to the following KB Article for more information: How to Update Email Addresses to the New KeeleyConstruction Format | Knowledge Base | Keeley Companies
Select the SMTP value and click Remove. It will put the value back into the Value to Add field.
For users that are new hires. Correct the value and click Add. Only one value is needed.
For users that have been with the company and have more-or-likely used their email, copy the Value to Add text, correct the value, click the Add button then paste in the old email and make sure the SMTP is lowercase. This allows the old email to be emailed but would then go to the new email.
SMTP: Primary
smtp: Secondary
Click OK, click Apply or OK.
Open Powershell ISE as Administrator.
Type changed and hit Tab. When .\ChangeDir.ps1 pops up, hit enter.
Click Open to open script RenameUPN.ps1.
Click anywhere on line 1 and click the Run Selection button. Log in with your Administrator credentials.
In Line 3, change the email addresses in purple. The one on the left is the old and the one on the right is the new address.
Once these are changed, make sure you click anywhere on Line 3 and click Run Selection.
In the prompt area, stay in E:\Scripts.
Type sync and hit Tab. When .\SyncMSOL.ps1 pops up, hit enter.
Finally, go into Microsoft 365 Admin Center. Go into Users and All Users.
Type in the first 5 letters of the new email to confirm it has synced.