bulk user script csv

Welcome Forums General PowerShell Q&A bulk user script csv

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

  • Author
  • #6235

    Topics: 1562
    Replies: 0
    Points: 0
    Rank: Member

    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
    -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?

The topic ‘bulk user script csv’ is closed to new replies.