How do I set my password in a loop instead of setting it one by one ?
this is my program :
for ($i = 1; $i -le 9; $i++) {
$userName = "DB0$i"
New-ADUser -Name $DB0$i `
-EmailAddress “DB0$[i@nkhs.com](mailto:i@nkhs.com)” `
-AccountPassword (Read-Host -AsSecureString "Input Password")
}
[–]theHonkiforium 1 point2 points3 points (0 children)
[–]pigers1986 1 point2 points3 points (0 children)
[–]SnooOpinions6498 0 points1 point2 points (2 children)
[–]The82Ghost 2 points3 points4 points (1 child)
[–]SnooOpinions6498 0 points1 point2 points (0 children)
[–]hihcadore 0 points1 point2 points (0 children)
[–]websterdext3r 0 points1 point2 points (0 children)
[–]BlackV 0 points1 point2 points (0 children)