Posts

Showing posts with the label Active Directory

Active directory - Import data from CSV file

You can use the powershell script below to import data from a CSV file to your Active Directory. This example importa the department property from file. Import-Module ActiveDirectory $users = import-csv c:\temp\data.csv foreach ( $user in $ users ){ Set-ADUser $ user . samaccountname -Department $ user . department } CSV file example samaccountname,department username1,departament1