Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Active Directory Account Edit

Posted on 2010-08-20
3
Medium Priority
?
603 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Group policies can be applied selectively to specific devices with the help of groups. Utilising this, it is possible to phase-in group policies, over a period of time, by randomly adding non-members user or computers at a set interval, to a group f…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

722 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