none
How to change Display name for bulk users

    Question

  • Hi Experts,

     

    our org having 250 users as a single OU. My requirement is need to add my company name in all users display name. How to do that in a single shot.


    Thanks, Venkatesh. "Hardwork Never Fails"
    • Edited by imvenkat Saturday, February 04, 2012 9:54 PM
    Saturday, February 04, 2012 9:54 PM

Answers

All replies

  • You can use ADModfiy.Net utility.

     

    Thanks

     

    Saturday, February 04, 2012 10:15 PM
  • You can also use PowerShell module from Quest:

    Add-PSSnapin Quest.ActiveRoles.ADManagement
    Get-QADUser * | Set-QADUser -DisplayName "$($_.DisplayName) `(Company`)"
    



    Rich Prescott | Infrastructure Architect, Windows Engineer and PowerShell blogger | MCITP, MCTS, MCP

    Engineering Efficiency
    @Rich_Prescott
    Windows System Administration tool 2.0
    AD User Creation tool
    Sunday, February 05, 2012 1:06 AM
  • @ MusrafAli

     

     

    Thanks for your information! But i need to add the company name alone! For Example Venkat (Company name). It should be added every user's display name alone!

     


    Thanks, Venkatesh. "Hardwork Never Fails"
    • Edited by imvenkat Monday, February 06, 2012 4:55 AM Spelling Corrections
    Monday, February 06, 2012 4:55 AM
  • Hi Venkatesh,

    Plain vanilla Powershell can do this.

    Import-Module ActiveDirectory
    
    foreach ($user in (Get-ADUser -Filter { sAMAccountName -like '*' } -Properties displayName -SearchBase "ou=someDivision,dc=yourCompany,dc=com")) { $user.displayName += " (Company Name)"; Set-ADUser -Instance $user }
    

    There's only two lines to it: the Import-Module is one line, the foreach is the other. Be careful of word wrapping here on the forums.

    Cheers,
    Lain

    Monday, February 06, 2012 5:51 AM
  • @lain

    Thanks for your info, but i am not able find the command line (import-module Active Directory), Can you please explain how to that! i am a beginner for powershell

     

     


    Thanks, Venkatesh. "Hardwork Never Fails"
    Monday, February 06, 2012 7:45 AM
  • @ Rich Prescott

    If execute this it will change the entire Display name as my company name. My requirements are we have already created 250 users with diffrent names we suppose to add the company name in bracket for each users in that ou.

    Note : The purpose of this requiremes is we have diffrent vendors so direct payroll employee's should be like (Ex: Venkat (Comapany name).


    Thanks, Venkatesh. "Hardwork Never Fails"
    Monday, February 06, 2012 8:06 AM
  • No problem.

    First, you need to have either the RSAT tools installed on your Windows 7/Vista machine, or you need to use Powershell from something like a domain controller. The reason you'll have to use one of these options is that the ActiveDirectory module is only available via these means. I'll stick to using the first option as reference point.

    Once you have installed the RSAT download (available here for Win7 with SP1), do the following:

    1. Go to Control Panel -> Turn Windows features on or off
    2. Add the Active Directory Module for Windows Powershell, as shown below:

    3. Once that's installed, start up Powershell. If you're not sure what it looks like, it's quite possible already on your Taskbar as shown below (icon on the right):

    4. Once the Powershell window has loaded, then you can run the above two commands.

     

    About those two commands:

    1. Import-Module is used to load modules which are what effectively does the work. In the example from my previous post, Import-Module ActiveDirectory instructs Powershell to load the ActiveDirectory module, which is required so that we get access to the Get-ADUser and Set-ADUser commandlets.
    2. Now that the library is loaded, we run the second command which actually does the work you wanted to complete.

     

    You might want to keep the following two commands in mind as you're learning how to work with Powershell as they can help you figure out what a command does (though searching Technet is better when you're still new to the game):

    • get-command <commandName>
    • get-help <commandName> -examples

    I know this isn't a thorough run-down on Powershell, but it should get you started.

    Cheers,
    Lain

    • Edited by Lain Robertson Monday, February 06, 2012 8:15 AM Grammatical correction.
    Monday, February 06, 2012 8:13 AM
  • @Lain

    thanks for the valubale information, but i have tried in my lab setup (I have Windows server 2008 enterprise edition 32 bit sp1 as domain controller and have windows 7 as a client. Again i am not able to find the import-module ActiveDirectory command as per your instruction. Please help me out.


    Thanks, Venkatesh. "Hardwork Never Fails"

    Wednesday, February 08, 2012 11:11 AM
  • Hi Venkatesh,

    First thing's first: did you download the RSAT tools I provided a hyperlink to in my last post? If you haven't, then scroll back up to that hyperlink and download those tools to your Windows 7 workstation.

    Cheers,
    Lain

    Wednesday, February 08, 2012 11:26 AM
  • Hi Venkatesh,

           You can try ASN Active Directory Manager bulk modification. It exactly fulfills your requirement. You can select the bulk users easily (through groups, containers, individual or csv file) and then add the displayname column with the value <<displayname>> (<<company>>). Then click Update to apply this values for all the users.

    Any attribute between << and >> will be replaced with the corresponding user's attribute value.

    For more details visit,

    http://www.adsysnet.com/asn-active-directory-manager-bulk-objects-modification.aspx

    The tool costs very low as well as you can use all the features without any restrictions using the free evaluation license for 7 days.

    You can get the evaluation license by registering here http://www.adsysnet.com/asn-active-directory-manager-licensing.aspx

    Saturday, October 12, 2013 7:23 AM