Modify AD Attribute

Posted on 2014-08-19
Last Modified: 2015-04-02
I am trying to modify an AD attribute for the "Manager" Property under the "Organization" tab usinfg a  tool call Wisesoft Builk AD user. I can chage almost all attributes with this tool but I' m unable to add any value to the Manager property. I have attached the the .CSV file i'm using to supply the software with the users it needs to modify information for.
Question by:SydNal2009
    LVL 14

    Expert Comment

    by:Ben Hart
    I think youd have better luck using PowerShell.  If you can generate a CSV file with the names of the users and the manager you can bulk import that change into AD.

    Here's a quick script
    This one will create a txt file with your users Names.
    get-content c:\users.txt | get-aduser - pr SamAccountName

    Open in new window

    This pull the usernames from the text file and modifies the Manager value.
    $Users = get-content C:\users.txt
    foreach ($user in $users)
    set-aduser $user -manager 'ManagerName'

    Open in new window

    The ManagerName variable requires a Distinguished Name, or SamAccountName.

    Also make sure you run this either on a DC or with a New-PsSession to your DC.
    LVL 14

    Accepted Solution

    Or if you wanted to modify a specific scope like say an OU, you could:

    get-aduser -filter * -searchbase "ou=something,ou=somethingelse,dc=domain,dc=com" | set-aduser -manager "ManagerName"

    Open in new window

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

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

    I had a question today where the user wanted to know how to delete an SSL Certificate, so I thought that I would quickly add this How to! Article for your reference. WHY WOULD YOU WANT TO DELETE A CERTIFICATE? 1. If an incorrect certificate was …
    The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
    This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
    This tutorial will walk an individual through the process of upgrading their existing Backup Exec 2012 to 2014. Either install the CD\DVD into the drive and let it auto-start, or browse to the drive and double-click the Browser file: Select the ap…

    737 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

    21 Experts available now in Live!

    Get 1:1 Help Now