PowerShell Script for Bulk service account creation
i have tried create script create bulk user objects in ad.
#script create bulk generic user account creation
param($ou=$(throw "you must specify path"))
$password = read-host "enter password" -assecurestring
import-csv "c:\temp\generic_users.csv" | % { new-aduser $_.user -samaccountname $_.user -givenname $_.user -
displayname $_.user -path $ou -userprincipalname $_.email -emailaddress $_.email -accountpassword $password -enabled
1 -passwordneverexpires 1 -cannotchangepassword 1 -description $_.desc }
my aim give ou name @ time of execution. example: .\service_acct.ps1 "ou path"
also, need clear output account created details , if error exists 9account exist).
thanks in advance.
prem
thanks, premkumar yogeswaran
hi,
please refer below article:
creating bulk active directory user
http://get-spscripts.com/2011/08/creating-bulk-active-directory-user-and.html
regards,
cataleya li
technet community support
Windows Server > Windows PowerShell
Comments
Post a Comment