Solved

Active Directory Account Edit

Posted on 2010-08-20
3
587 Views
Last Modified: 2012-05-10
I'm currently in need of a script that will read a .csv or excel file, take information from column 4(EmployeeNumber) query active directory for the user who has that employeeNumber and then take the number from column 3 (ID) and enter it into that employee's extensionAttribute14 in Active Directory
0
Comment
Question by:dmillerpps
  • 2
3 Comments
 
LVL 10

Expert Comment

by:Casey Herman
ID: 33488610
I would suggest a script that modifies AD using secure LDAP.  But it will not be easy and mistakes could jack your active directory installation.  Our firm does that sort of work but it would most definitely be fee based.
0
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 33488663
Ok so working on this but so far this will do it for a single user. This uses the quest powershell cmdlets and using specific variables.

get-qaduser -oa @{employeeID='6474'} | set-qaduser -oa @{extensionAttribute14='2525'}

Still playing around trying to get this into a script form for you.
0
 
LVL 35

Accepted Solution

by:
Joseph Daly earned 500 total points
ID: 33488792
Ok just tested this on two accounts in my domain and this worked correctly. Using the script below and a csv file similar to the one attached. You can relable the column headings in the CSV file whatever you like as long as you match them in the script.


import-csv "C:\test.csv" | foreach {get-qaduser -oa @{employeeid=$_.employeeid} | set-qaduser -oa @{extensionAttribute14=$_.extension}}

Open in new window

test.csv
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

895 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

12 Experts available now in Live!

Get 1:1 Help Now