Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 30
  • Last Modified:

Modify AD Attribute

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.
HR-Bulk-AD-Test.csv
0
SydNal2009
Asked:
SydNal2009
  • 2
1 Solution
 
Ben HartCommented:
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.
0
 
Ben HartCommented:
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



http://chronicgeekage.blogspot.com/2014/08/modifying-manager-field-in-ad-in-bulk.html
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now