Created
February 1, 2013 21:20
-
-
Save russom-woldezghi/4694227 to your computer and use it in GitHub Desktop.
Update Active Directory users using PowerShell from .csv file (without using Quest).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module ActiveDirectory | |
$USERS = Import-CSV c:\scripts\usersupdate.csv | |
$USERS|Foreach{ | |
Set-ADUSer -Identity $_.samaccountname -TelephoneNumber $_.TelephoneNumber -scriptPath $_.LoginScript -homeDirectory $_.HomeDirectory -title $_.JobTitle -department $_.Department -telephoneNumber $_.WorkPhone | |
-facsimileTelephoneNumber $_.Fax -office $_.Office -streetAddress $_.StreetAddress -l $_.City -st $_.State -postalCode $_.PostalCode -c $_.Country -company $_.Company -manager $_.ManagerAdspath } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I am extremely new to power shell scripting,
Currently using Windows server 2016, and trying to update my users on AD,
Possible for me to have a template of the .csv file?
Thank You
Bastian