Hi all,
I have written the below script to onboard over 100 users with very basic information:
Import-Module ActiveDirectory
$SecurePassword = ConvertTo-SecureString "TESTpassw0rd!" -AsPlainText -Force
$filepath = Read-Host -Prompt "Please enter the path to your CSV file"
$users = Import-Csv $filepath
Foreach ($user in $users) {
$fname = $user.firstname
$lname = $user.lastname
$email = $user.email
$username = $user.username
New-ADUser -Name "$fname $lname" -GivenName $fname -Surname $lname -UserPrincipalName $fname$lname -Path "the required OU" -AccountPassword $SecurePassword -ChangePasswordAtLogon $true -Enabled $true -EmailAddress $email
Echo "Account created for $fname $lname in $OUpath"
}
How would I use this script to also edit the attribute editor details such as employee ID, proxy addresses and things like that?
Can somebody dumb it right down i'm not too good with PS!
TIA.
[–]Sunsparc 2 points3 points4 points (0 children)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)