Change display name for existing users

Hi,
We have alot of users in our Active Directory. After an migration our existing users are displaying their name wrong. When we create a new user the display name is set FirstName LastName. But all of our old users have their User logon name as display name.
Is there a way to change the display name of our old users to FirstName LastName instead of the user logon names they are displaying now? Doing this per user is a hell of a job so this really isn't an option.
Example:
Full name: Peter Peterson. User logon name: pepeter. Display name: pepeter. (old user)
Full name: Tom Thompson. User logon name: tothomp. Display name: Tom Thompson. (new user)
Greetz,
Tom

I have found a script for Powershell that may be the answer to my question. There is only one thing that is not in the script. The script runs for all users. The PageSize is set to 2000 so it runs 2000 entries. Is there a way that I can run this script for
all Users in AD that start with the letter "A" or with an other letter. :P
$previewMode = $true #change value to $false ONLY after you have verified the preview!!!
$CurrentDomain = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()
$Domain = [System.DirectoryServices.DirectoryEntry]"LDAP://$CurrentDomain"
$Searcher = New-Object System.DirectoryServices.DirectorySearcher
$Searcher.PageSize = 2000
$Searcher.SearchScope = "Subtree"
$Searcher.Filter = "(&(objectCategory=person)(objectClass=user)(!(objectClass=computer)))"
$Searcher.PropertiesToLoad.Add("userPrincipalName") > $Null
$Searcher.PropertiesToLoad.Add("givenName") > $Null
$Searcher.PropertiesToLoad.Add("sn") > $Null
$Searcher.PropertiesToLoad.Add("distinguishedName") > $Null
$Searcher.SearchRoot = "LDAP://" + $Domain.distinguishedName
$SearchResults = $Searcher.FindAll()
$dnsSuffix = $CurrentDomain.Name
foreach ($Result in $SearchResults){
               $firstName = $Result.Properties.Item("givenName")
               $lastName = $Result.Properties.Item("sn")
               $newLogonName = "$firstName $lastName"
                [System.DirectoryServices.DirectoryEntry]$userObject = $Result.GetDirectoryEntry()
                $oldLogonName = $userObject.sAMAccountName
    Write-Host "Changing $oldLogonName to $newLogonName..."
    try {
        if (!($previewMode)) {
                   $userObject.cn = $newLogonName           
           $userObject.CommitChanges()
        Write-Host "$oldLogonName successfully changed to $newLogonName."
    catch{
        Write-Host "Error changing $oldLogonName to $newLogonName."

Similar Messages

  • Share Name, Printer Name and display name for End User

    We are being forced to standardize printer names.  So, for example, a printer that is on the print server might have the following properties:
    NAME: PR25739
    SHARE NAME: Clinic Admin Office
    SERVER NAME: A700500
    The share name seems to be pointless - almost vestigial.  When a user maps to the printer, it is named (on their device) PR25739 on A700500.  They can't change it, I can't change it - indeed, the Name field is disabled during the Install Printer
    Wizard.  The whole point of the share name, to me, is to make something that is user-friendly with context and useful information.  But the sharename seems to be completely ignored.  Is there any setting I can change that will make this printer
    map so that it is displayed to the user as Clinic Admin Office or even Clinic Admin Office on A700500?  Solutions that must take place on the EUD are not solutions - the name needs to be correct out of the box.
    Thanks.

    Unfortunately, no.  The standardization mandate specifically states "printer name" - changing the Share Name was my last ditch attempt to inject some sense and serve my users.  Right now, I have 5 printers mapped, and they look like this:
    PR25737 on A700500
    PR25739 on A700500
    PR12336 on A700500
    PR35127 on A700500
    PR29764 on A700500
    I know to use the location field in the printer dialog, but I don't expect my users will - and without that, even I can't keep up with what printer goes to what physical device.

  • Changing display name for webmail sending

    First version is:
    Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)
    libimta.so 6.3-6.03 (built 17:12:37, Mar 14 2008; 32bit)
    SunOS net16 5.9 Generic_122300-51 sun4u sparc SUNW,Netra-T12
    I would like to use another full name instead of the default cn for mails sent
    out by webmail.
    I've searched through this forum and found that most of the answers
    seem to be doing the step:
    1. add personalmap to the tcp_local stanza in imta.cnf
    2. add to the mappings file, lines like:
    PERSONAL_NAMES
    *|[email protected] $YNew$ Name
    I tried the above but didn't work
    But I also found this answer, i.e. add this to option.dat
    LDAP_PERSONAL_NAME=displayName
    and it worked for me
    Just wonder why the first method didn't work for me.
    And curious to know which way is more proper.

    Yes, I did issue that 2 imta commands after modifications of the imta.cnf and mappings files
    By the way, does it matter where I placed the stanzas
    Pls give me real examples of them for my reference.

  • How to change the display name for Gmail aliases?

    I have a Gmail account with multiple aliases. They look like this:
    Joe User <[email protected]> (Primary)
    Support <[email protected]> (Alias)
    Billing <[email protected]> (Alias)
    Works great. I'm trying to set up Apple Mail on my new MacBook to support the aliases as well. I am able to input the e-mail aliases, but the display names for all are 'Joe User' which defeats the purpose of having the aliases.
    I have to imagine I can do this. Can someone help me out?
    Regards,
    Dave

    Anyone came here, refer to this post.
    http://h30499.www3.hp.com/t5/Community-Feedback-Suggestions/change-of-display-name/m-p/6667672/highl...

  • Changing the display profile for multiple users at once.

    Is it possible to change the display profile for multiple users at once? We would like ot be able ot add tabs and channels globally, but right now we can anly do it for once user at a time. Also, is it possible to have certain generic display profiles that all users use? like an admin profile and a tech support profile and a normal suer profile? Any help is appreciated...

    Yes this possible using the dpadmin batch command.
    Please check the dpadmin documentation for the batch command.
    For generic display profile what you can do is create users and assign the user particular roles. The display you would be creating would be for the roles. The users belonging to that role would inherit that display profile.
    HTH ..

  • Change DISPLAY NAME

    I install this messaging :
    Sun Java(tm) System Messaging Server 6.2-8.04 (built Feb 28 2007)
    libimta.so 6.2-8.04 (built 19:20:35, Feb 28 2007)
    SunOS sunmail 5.10 Generic_125101-01 i86pc i386 i86pc
    My problem is:
    When user send email to internet user ( ex: yahoo.com or gmail.com etc. ) the messaging. must change the DISPLAY NAME with other DISPLAY.
    ex: from: Giovanni <[email protected]>
    on
    from: External Mail <[email protected]>
    I try with CONVERSION channel but it's change only body of mail.
    ### mappings
    CONVERSION
    IN-CHAN=tcp_*;OUT-CHAN=tcp_*;CONVERT Yes
    ### Conversion
    ! Append disclaimer to single part messages if the body part
    ! is text.
    in-channel=tcp_*; out-channel=tcp_*;
    in-type=text; in-subtype=*; part-number=1;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=0;
    command="/opt/iplanet/sitescripts/change.sh footer.txt"
    ! Append disclaimer only to the first part of a multipart message
    ! if that part is a text message part. (part-number=1.1 is the
    ! first part of a multipart message).
    in-channel=tcp_*; out-channel=tcp_*;
    in-type=text; in-subtype=*; part-number=1.1;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=0;
    command="/opt/iplanet/sitescripts/change.sh footer.txt"
    ### Script Change.sh
    Change $MESSAGE_HEADERS
    cat NEW_MESSAGE_HEADERS > $MESSAGE_HEADERS
    But don't work.....
    I try with reverse mapping but change only email address don't change display name
    #### mappings
    REVERSE
    *|tcp_local|[email protected] $D$Y"NEW DISPLAY"[email protected]
    I try with sieve filter but I don't know how change FROM.
    ### imta.cnf
    tcp_local destinationfilter file:///opt/SUNWmsgsr/config/invia.filter
    What is the correct way ? There are other way ?
    It's possible change the Display Name ?
    Thank's
    Giovanni

    Hi,
    My problem is:
    When user send email to internet user ( ex: yahoo.com
    or gmail.com etc. ) the messaging. must change the
    DISPLAY NAME with other DISPLAY.
    ex: from: Giovanni <[email protected]>
    on
    : External Mail <[email protected]>
    I try with CONVERSION channel but it's change only
    body of mail. Correct, the conversion channel only deals with MIME body parts and not the email headers themselves.
    I try with reverse mapping but change only email
    address don't change display name
    #### mappings
    REVERSE
    *|tcp_local|[email protected] $D$Y"NEW
    DISPLAY"[email protected]
    Haven't tried this myself but will take your word for it.
    I try with sieve filter but I don't know how change
    FROM.
    ### imta.cnf
    tcp_local destinationfilter
    file:///opt/SUNWmsgsr/config/invia.filterWith 6.3 you could use the deleteheader/addheader to remove the From: and replace it with something else - this ability doesn't exist in 6.2.
    What is the correct way ? There are other way ?
    It's possible change the Display Name ? Yes.
    You can change the display name by using the PERSONAL_NAMES mapping table.
    For example to change the following on outgoing email (via tcp_local):
    From: Shane Hjorth <[email protected]>
    to
    From: What The <[email protected]>
    1) Add the personalmap keyword to the tcp_local channel
    2) Add the following mapping table to the mappings file:
    PERSONAL_NAMES
      *|[email protected]   $YWhat$ The3) Rebuild config
    ./imsimta cnbuild; ./imsimta restart
    This is all explained in the messaging server admin guide "Handling Personal Names in Address Header Lines".
    Regards,
    Shane.

  • Change display name of workflow email address in sharepoint 2010

    Hi
    How I can change display name of workflow email address in sharepoint 2010. I want to configure display name (from address)of email
     for each site collection separately.for example I want to change "software unit"
     in below pic to another name for my software unit site collection.
    How I can do this?
    Thanx.

    Hi,
    According to your post, my understanding is that you want to change display name of workflow email address in sharepoint 2010.
    In my environment, if I assign a task to a user, the email is as below:
    The “test” is the site name, the [email protected] is the “From” user.
    Do you want to change the “From” field in the workflow?
    If so, you can have a look at the "Send email extended" custom SPD workflow activity (http://www.codeplex.com/SPDActivities
    ) which allow you to specify the sender.
    Here are some similar threads for your reference:
    https://social.technet.microsoft.com/Forums/en-US/22d95510-95b7-4882-b988-4038e59fb031/how-to-change-the-display-name-for-sharepoint-emails-sent-using-workflows?forum=sharepointgeneralprevious
    http://sharepoint.stackexchange.com/questions/19186/changing-from-email-address-in-sharepoint-designer-2010-workflows
    http://sharepoint.stackexchange.com/questions/61964/how-to-change-the-from-address-in-feedback-workflow-email
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How can I change the password for the USER in SAP.

    How can I change the password for the USER in SAP?
    also I want to change the Language and  date Format b/c it's displaying in German language..

    Hi,
    Assuming that User has already his/her user-id and password, and now he/ she wants to change it.
    select the client and provide Log-in credentials. Now, instead of 'ENTER' there is one Tab: 'New Password' (up, left hand). Click it.
    Now, system will ask for new password to change.
    If you are asking from Basis point of view, then T.code: SU01 - User Maintenance.
    Enter User's id and Click Change icon.
    It will lead to Page: Maintain User.
    Here, Select tab: Logon Data
    There is a Sub-Tab: Password.
    Here, key-in change password and SAVE.
    For Language and Date format, contact your Basis-Personnel.
    Best regards,
    Amit

  • Email display name for mobile me

    is there a way to change my display name for my me.com email account to a gmail address? i have forwarded the gmail, and do not want the confusion of a new email address for recipients. under mail preferences, "send mail as", you can enter a name, but it will not let me include "@". thanks for any help.

    Post Author: amr_foci
    CA Forum: Publishing
    we are using microsoft mail server, and its working fine, i just write the Email, and i got the mail written by the name equivalant to this name in the Active Directory.
    and also its working fine when i write only the name
    wat mail server u r using?

  • Why can't we change display name?

    Its very funny that we cant change display name and also we must have earlier feature which shows all the logged on members
    Think about it
    Thank you

    In the past you had to wait a while for the caches to refresh anyway, now you need to wait an eternity or contact SAP.
    The "display name" is no longer editable.
    So if you are going to choose a pseudonym which is well known, make sure the guy is already dead and cannot get up to any more mischief or new scandals...
    Cheers,
    Julius

  • Create new mailbox for existing users?

    Hi All,
    I am new to JNDI concepts. I need to create new mailbox for existing users in domino directory. is it possible?
    Scenario is : I have some users in domino directory. They dont have mail account now. I want to create it.
    Kindly guide me...
    Thanks,
    Ram

    Hi,
    You can try LSMW (Direct method) for uploading class values.
    Upload file can hae following structure:
    OBJEK     |     ATINN     |     KLART     |     ATWRT
    Release Grou+Release strategy |     Characteristic name     |     Class type     |     Class Value
    e.g. rel grp is PO, rel strategy is 01, characteristic name is EBAN_EKORG, and class value is 1000 then
    OBJEK     |     ATINN     |     KLART     |     ATWRT
    PO01     |     EBAN_EKORG |     032     |     1000
    multiple characterstics can be
    OBJEK     |     ATINN     |     KLART     |     ATWRT
    PO01     |     EBAN_EKORG |     032     |     1000
    PO01     |     EBAN_EKGRP |     032     |     100
    Regards,
    Yogesh

  • My MacBook Pro keeps making copies of a document that I am trying to save. I don't want to duplicate the file. I only want to save it on both my hard drive and my external hard drive. I do not want to change its name for every save, which the computer see

    My MacBook Pro keeps making copies of a document that I am trying to save. I don't want to duplicate the file. I only want to save it on both my hard drive and my external hard drive. I do not want to change its name for every save, which the computer seems insistent on doing. Help!!

    11lizzyp wrote:
    can't be saved because the file is read-only.
    I did not create the file to be read-only. I created to be able to continue to add to it as I work on it.
    More on versions here:
    http://support.apple.com/kb/ht4753
    local snapshots:
    http://support.apple.com/kb/HT4878
    Sounds like a permissions problem ie read only.
    If running repair permissions from your DiskUtility.app does not sort it,
    Someone should jump in here with erudite and concise fix.

  • Access Policy for Existing Users

    Hi,
    Here is the Scenario:
    1. We have AD resource object having "Allow Multiple" Unchecked
    2. We have Users who are already provisioned to AD
    We are trying to introduce Auto Provisioning into our system for AD, I know new users will be evaluated against Access policies and will be provisioned to the resource and hence groups management will be taken care automatically, Questions:
    1. If I disable resources (and not revoke) for these new users what will be the group membership status -will they be removed from group?
    2. How to pull existing users under this auto prov umbrella? My thoughts: by writing a custom scheduler that will check resource provisioned and make it as part of the group, but will resource be revoked automatically if group is removed for these users? If not what should be the approach for existing users?
    Thanks in advance

    I've completed a similar tasks using SQL.Take a look at the following table and you can do these tasks:
    UPP, UPD, USG, POG and AD group table 'UD_ADUSRC'

  • Change of UID for Oracle user  - Impact

    If change of UID for Oracle user in solaris will affect the database which is already running. Wil it have any impact for the databases?
    Guys please advise.
    Thnx,
    Satheesh

    Many thanks for the response. We are not changing the UID but there are some errors in the script related to file permissions. So just wanted to know will it have any impact on the database if we change the UID.

  • Setting Display Name for sent emails

    Hi All,
    I want to set a display name for sent emails. For example: when I send emails using [email protected] and after receivign this amil in my inbox it says from [email protected] Is there any way that I can show display name for this like Kartik <[email protected]>.
    is there any API by which I can set this display name? Or this has to be done on mail server?
    Any help would be appreciated!!
    Thanks, Kartik

    it asks for a attribute messageFrom and passes it to SMTPTransport. I have tried setting different values for messageFrom like
    messageFrom=Test Email
    messageFrom="Test Email"
    but it didn't work for me. it expects a domain name there (even if its dummy) like
    messageFrom=[email protected]
    Can you tell me at which place InternetAddress is been called by SMTPTransport so that I can write my own impl for it.

Maybe you are looking for

  • CPU Upgrade on Toshiba Tecra M3

    Hi, I just finished refurbishing my Toshiba Tecra M3 (64MB Nvidia 6200 model) which had been dead for 6 months. Basically it had the mainboard changed (applied new daimond thermal grease over GPU/CPU due to overheating issue), new screen installed, n

  • Time Machine & external hard drives not used daily

    I have a question about Time Machine and external hard drives that I used for storing digital files. I do not need to turn on these drives every day. Or even every week. Is Time Machine going to "forget" them (delete their files from backups) if I do

  • ArchiveLink security: sending public key certificate by SCMS_HTTP_PUT_CERT

    Hello! I have a question which I asked on ESA and Security forums and didn't get answer. I am trying to do a test program to check ArchiveLink security features. Namely, I am calling the function SCMS_HTTP_PUT_CERT which is supposed to send a public

  • Dynamic Click Tracking Without clickTag

    I've got an unusual circumstance where I'm not loading my flash file from within a webpage. Normally I use getURL() with clickTag to set my destination URL and tracking URL in the html, but in this case I am setting all of my variables using SetVaria

  • Why can't i restore my ipod touch 4th generation

    why can't i restore my ipod touch 4th generation