Update AutoUserAndOUCreator.ps1
This commit is contained in:
parent
66f6a45f92
commit
08041157e7
|
@ -1,7 +1,7 @@
|
||||||
# Copyright 2024 Rayyan Hodges, M Salim Olime, TAFE NSW, AlphaDelta
|
# Copyright 2024 Rayyan Hodges, M Salim Olime, TAFE NSW, AlphaDelta
|
||||||
# Contact: rayyan.hodges@studytafensw.edu.au, mohammad.olime1@tafensw.edu.au
|
# Contact: rayyan.hodges@studytafensw.edu.au, mohammad.olime1@tafensw.edu.au
|
||||||
# Program Name: AutoUserAndOUCreator
|
# 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.
|
# 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
|
# Import required PowerShell modules
|
||||||
|
@ -30,4 +30,4 @@ ForEach ($user in $fusers) {
|
||||||
$OUpath = $user.OU
|
$OUpath = $user.OU
|
||||||
echo $fname $lname $jtitle $OUpath
|
echo $fname $lname $jtitle $OUpath
|
||||||
New-ADUser -SamAccountName = $fname.$lname -UserPrincipalName "$fname@alphadelta.com" -Path $OUpath -AccountPassword $fsecPass -Enabled $true -PassThru
|
New-ADUser -SamAccountName = $fname.$lname -UserPrincipalName "$fname@alphadelta.com" -Path $OUpath -AccountPassword $fsecPass -Enabled $true -PassThru
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue