diff --git a/AutoUserCreator.ps1 b/AutoUserCreator.ps1 index da4eb24..830b0e9 100644 --- a/AutoUserCreator.ps1 +++ b/AutoUserCreator.ps1 @@ -9,9 +9,6 @@ Import-Module ActiveDirectory # Define temporary password which MUST be changed when the user first logs into the Active Directory. $SecurePass = ConvertTo-SecureString -AsPlainText "Mypassword1" -Force -# Force user to change password when logging on for the first time -ChangePasswordAtLogon = $true - # Define the file path where the CSV file containing users is. $csvfilepath = Read-Host - Prompt "Please enter the location of the CSV file containing the user list" @@ -20,7 +17,7 @@ ForEach ($user in $users) { $fname = $user.'First Name’ $lname = $user.'Last Name' $jtitle = $user.'Job Title' -$OUpath = $user.'Organizational Unit' +$OUpath = $user.'Organizational Unit' #Example entry: OU=Staff,OU=Manager,DC=alphadelta,DC=com # Command to add user's to Active Directory. New-ADUser -Name $fname -UserPrincipalName "$fname.$lname"