The background is as follows. I have to write it for homework (Homework - Scripts and Command Line)
Main goal is to create two PowerShell scripts. This time aren’t any specific requirements about the infrastructure.
Do the following:
1. Create an interactive PowerShell script that asks the user for:
a. First name
b. Last name
And based on the user’s input creates:
- AD user with SamAccountName with the following format First_name.Last_name
- Personal (named) folder in C:\Shared on the computer where the script is executed
For example if user executed the script on the DC and entered for first name Name, for last name LastName,
and for password Password1, then a new AD user with SamAccountName equal to FirstName.LastName will be
created. In addition, a new folder C:\Shared\FirstName.LastName will be created as well.
Then the script should ask the user if he/she wants to create another user or no.
2. Create a non-interactive PowerShell script that accepts the following parameters on the command line:
So, if the user supplied 1, 3, 1, and 2 as corresponding parameter values, then the following folder
structure shall be created:
Send/attach the scripts
I am ready with the first condition