Need help with Powershell script to update the "name" parameter in AD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 06:32 AM
I have to update the "name" parameter in AD when the user is created in AD. We have OOB powershell script which creates user in AD. We have Orchestation setup to create/update users in AD. So inorder to update the "name" parameter, Servicenow has suggested a Support article https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0784931#:~:text=psm1
I have followed the same however I am getting an error:
The whole purpose of updating this is, we want the Name to be displayed as "Lastname, Firstname" in AD.
We were successfully able to update the Display name to be "Lastname, Firstname", but the "name" parameter is same as samaccountname. Samaccountname is {first letter of the first name + lastname) = "flastname". Even if we are updating the "name" parameter, the name is getting set as that of samaccountname.
We cannot change the samaccountname as that is the unique key in AD.
Please help what solutions can be implemented.