Solved

How to change First Name, Last Name and display name in AD Accounts

Posted on 2010-09-23
5
961 Views
Last Modified: 2012-05-10
We are trying to clean up our AD Accounts by adding First Names, Last Names as well as Display Names and I am looking for the most efficient way to automate this process.  Any suggestions would be greatly appreciated.

Thanks,
0
Comment
Question by:bob_kochanski
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 10

Expert Comment

by:dhruvarajp
ID: 33745798
0
 
LVL 10

Expert Comment

by:dhruvarajp
ID: 33745805
you can use it for non exchange spedific attribues as well from the general tab
0
 
LVL 6

Accepted Solution

by:
Alan Gunn earned 250 total points
ID: 33746105
Hi Bob!
If your users are currently using their Samid, windows 2000 style login names like "KochanskiB" you will presumably have a list of their first and last names.
There are a number of ways of inserting this info into AD.
The "DS" commands are tools for manipulating AD.
They require the distinguished name of an object in AD
This looks like
"CN=KochanskiB,CN=Users,DC=uk,DC=YourCompany,DC=com"
 To add Firstname, lastname and displayname to user account where the samid is known , you could use DSQuery to find the DN of the user and pipe the result using | (Shift \ on my keyboard) to DSMod.
dsquery user -samid KochanskiB | dsmod user -fn Bob -ln Kochakski -display "Bob Kochanski"
 To do this for lots of users, you could use Excel to "Build" the required commands.
See the attached Code snippet for the formula in E2
The commands can be highlighted and copied and pasted into a command prompt to execute.
 Hope this helps! :-)
 

="dsquery user -samid " & A2 & " | dsmod user -fn " & B2 & " -ln " & C2 & " -display " & """" & D2 & """"

Open in new window

addfirstlast.bmp
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 33749911
@ Tardis, that's not bad!  You could also use a macro to take those commands and put them in a batch file, which could then be executed.....then it would be a full solution.

Rob.
0
 
LVL 6

Expert Comment

by:Alan Gunn
ID: 33769693
Thanks Rob! :-)
The good thing about re-inventing the wheel is that you don't HAVE to put the hole in the middle! :-)
 
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the method of using the Resultant Set of Policy Tool to locate Group Policy that applies a particular setting.
After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question