Update AutoUserAndOUCreator.ps1

This commit is contained in:
Ray 2024-04-09 01:43:22 +10:00 committed by GitHub
parent 66f6a45f92
commit 08041157e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
# Copyright 2024 Rayyan Hodges, M Salim Olime, TAFE NSW, AlphaDelta
# Contact: rayyan.hodges@studytafensw.edu.au, mohammad.olime1@tafensw.edu.au
# Program Name: AutoUserAndOUCreator
# Purpose of script: Create a batch set of user's using a CSV file containing a list of predetermined users.
# Purpose of script: Create a batch set of user's and OU's using a CSV file containing a list of predetermined users and OU's.
# Other notes: Orginally created by M Salim Olime (Salim), my teacher as part of our class with my assigned modification of creating batch OU's within the script.
# Import required PowerShell modules
@ -30,4 +30,4 @@ ForEach ($user in $fusers) {
$OUpath = $user.OU
echo $fname $lname $jtitle $OUpath
New-ADUser -SamAccountName = $fname.$lname -UserPrincipalName "$fname@alphadelta.com" -Path $OUpath -AccountPassword $fsecPass -Enabled $true -PassThru
}
}