rilpoint_mw113

ActiveDirectory

Creating Users in Bulk

Automatic Method

Download zip file from here.

Custom Method

Create a file named users.csv which looks like this:

Name,SamAccountName,Title 
John Smith,john.smith,SharePoint Consultant 
SharePoint Farm,svc.sp_farm,Service Account 
SharePoint Service Apps,svc.sp_serviceapps,SharePoint Service Application Account

Next, in PowerShell:

  • Add Active Directory Module
Import-Module ActiveDirectory
  • Import accounts from users.csv into AD
Import-Csv .\users.csv | foreach-object {New-ADUser -SamAccountName $_.SamAccountName -Name $_.name -DisplayName $_.Name -Title $_.title -Enabled $true -ChangePasswordAtLogon $false -PasswordNeverExpires $true -AccountPassword (ConvertTo-SecureString "pass@word1" -AsPlainText -force) -PassThru -WhatIf}
Skin by RIL Partner