Powershell command to change user Fullname

Posted on 2011-04-19
Last Modified: 2012-06-27
I have successfully used the following powershell script to modify the Diplay Name of existing users in our AD one specified OU at a time:

Get-ADUser -Filter * -SearchBase "OU containing users to change" -Properties DisplayName, Initials | % {Set-ADUser $_ -DisplayName ($_.Surname + ' ' + $_.GivenName + ' ' + $_.Initials)}  

I am trying to find a similar script that will apply the same change to the Full Name as well (the get-aduser property appears to be called just 'Name') but set-aduser doesn't appear to accept -Name or -FullName and I can't seem to find an equivilent in the help for set-aduser.  Does anyone have an alternative suggestion?  Would prefer powershell, but I want to be able to keep the script and use it to update users one OU at a time.
Question by:PtboGiser
    LVL 38

    Accepted Solution

    The Name attribute represents the actual CN= value of the user object, and can't be changed with set-aduser. You have to utilize the rename-adobject cmdlet to do this. The attached code would do it.
    rename-adobject -identity (get-aduser <username>).distinguishedname -newname <new name>

    Open in new window


    Author Closing Comment

    Perfect, thanks so much!!

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    In this previous article (, we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
    This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
    This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    26 Experts available now in Live!

    Get 1:1 Help Now