Solved

Modify Active Dirctory user attributes from a list

Posted on 2013-05-24
3
380 Views
Last Modified: 2013-05-24
I would like to use a PowerShell script that will change the department attribute of a users accounts from a list of users in a text or csv file .  I have quest power tools installed.
0
Comment
Question by:AC-D
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 400 total points
ID: 39195274
Try..
Import-Csv Test.csv | % {
set-qaduser $_.user -manager $_.Manager
}

Open in new window

CSV Format
user,Manager
UserA,ManagerA
UserB,ManagerB

Open in new window

0
 

Author Comment

by:AC-D
ID: 39195688
Awesome ,, Thanks !

I needed to populate the department field so I replaced -manager with -department but it worked perfectly.
0
 
LVL 40

Expert Comment

by:Subsun
ID: 39195738
Lol.. I think I have seen manager...might be confused with another question..anyways glad you could make it.. :-)
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

The article will show you how you can maintain a simple logfile of all Startup and Shutdown events on Windows servers and desktops with PowerShell. The script can be easily adapted into doing more like gracefully silencing/updating your monitoring s…
How to sign a powershell script so you can prevent tampering, and only allow users to run authorised Powershell scripts
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

813 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