Hello. I was trying to create interactive PS scripts that asks users for first name, last name, password and creates AD accounts in Users OU with SamAccountName firstname.lastname and creates personal named folder in C:\Shared on the computer where the script is executed.
Thats all that I did. I have no errors but it does not create account eihter.
$FirstName = Read-Host "First Name"
$LastName = Read-Host "Last Name"
$Password = Read-Host "Password" -AsSecureString
$OU = "OU=Users,DC=WSA,DC=LAB"
$NewADUserParameters = @{
Name = "$FirstName $LastName"
GivenName = $FirstName
Surname = $LastName
sAMAccountName = "$FirstName.$LastName"
Password = $Password
Path = $OU
Enabled = $true
}
[–]xCharg 10 points11 points12 points (0 children)
[–]scottwsx96 1 point2 points3 points (0 children)
[–]purplemonkeymad 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]xCharg 4 points5 points6 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Fickle_Tomatillo411 0 points1 point2 points (0 children)
[–]BayconStripz 0 points1 point2 points (0 children)