by gerhardt7 at 2012-12-18 02:36:19
i want set all users in ad with a powershell script now i have made this script but it doesnt work
New-ADUser -Path "ou=Users,dc=ad.handel,dc=nl" -Name "Gerhard Timmerman"
-SAMAccountName "Gerhard.Timmerman" -UserPrincipalName "email@example.com"
-EmailAddress "firstname.lastname@example.org" -GivenName "Gerhard" -Surname "Timmerman"
-Description "Gerhard voorbeeld"
-Company "gtservice, nl." -Department "Admin"
-Office "Nederland" -AccountPassword (ConvertTo-SecureString
-AsPlainText "P@ssw0rd" -Force)
-ChangePasswordAtLogon $true -Enabled $true
i want change this to made it with values
-SAMAccountName $username -UserPrincipalName $prinname
i want that i automtic make gehrard.timmerman (firstname + . + lastname)
how must i do this and that the samacount username . lastname is
and what have i done wrong that its not working
by Klaas at 2012-12-18 04:41:07
can you post the entire script you're using now and a few lines of you csv file, please?