bulk user script csv

This topic contains 0 replies, has 1 voice, and was last updated by  Forums Archives 5 years, 8 months ago.

  • Author
    Posts
  • #6235

    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 "gerhard.timmerman@ad.handel"
    -EmailAddress "gerhard.timmerman@gt-service.nl" -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
    demo:
    -SAMAccountName $username -UserPrincipalName $prinname
    csv:
    prinname,email,firstname,lastname,description,office,password

    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

    Gerhard
    can you post the entire script you're using now and a few lines of you csv file, please?

You must be logged in to reply to this topic.