Solved

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

Posted on 2010-09-23
5
959 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
  • 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
In-place Upgrading Dirsync to Azure AD Connect
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 …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

828 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