Archive

Archive for the ‘Microsoft Windows’ Category

Add Active Directory Users from CSV file

July 9th, 2012 Comments off

A prerequisite for the following is
As a start I have to figure out the command that simply creates the user based on my requirements.
The CSV headers that I have are “FirstName”, “LastName”, “Alias” which I will use for account name and “TempPass” which is a column with randomly generated passwords that the users will initially have to use.

I got the following command working:

new-aduser -samaccountname smithj -Name "John Smith" -GivenName John -Surname Smith -AccountPassword (Convertto-securestring -asplaintext "Bgve1Y24" -force) -changepasswordatlogon $true -Country "US" -DisplayName "John Smith" -Enabled $true

Read more…