From d52fb7f4e925dab33d58a25e11ad6ea680815440 Mon Sep 17 00:00:00 2001 From: reiyua Date: Mon, 25 Mar 2024 22:18:02 +1100 Subject: [PATCH] Update AutoUserCreator.ps1 --- AutoUserCreator.ps1 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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"