Solved

Active Directory Account Edit

Posted on 2010-08-20
3
588 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
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 transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

770 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