Quantcast
Viewing all articles
Browse latest Browse all 15370

adding 100 users using powershell (windows server 2012)

hi ive tryed to use this on windows server 2012 R2

Import-Module ActiveDirectory foreach($i in 1..100) { $AccountName = "Student{0}" -f $i $SecurePassword = "Password01" | ConvertTo-SecureString -AsPlaintext -Force New-ADUser -Name $AccountName -AccountPassword $SecurePassword -Path "OU=Bulk,DC=ad,DC=DC2,DC=local" -Enabled:$true }

but its didnt worked well -

it says -

new-ADUser : the server is unwilling to process the request

new-ADUser -name $AccountName -accountPassword $SecurePassword -path "ou=bulk,DC +categoryinfo : notspecified (cn=student1,ou=...=DC2,DC=local:string) [new-aduser], ADException
+fullyqualifiederrorid : activedirectoryServer:0,microsoft,activedirectory,managment,commands,newaduser

100times

this is myDetails:

computer name:DC2

domain-name:beeriprint

OU:bulk

users:student1-100

password: password01

THANKS alot :)


Viewing all articles
Browse latest Browse all 15370

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>