Solved

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

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
In-place Upgrading Dirsync to Azure AD Connect
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 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