gagandeep assignment 6 final
gagandeep assignment 6 final
Assignment 6
WINDOW SERVER AND POWERSHELL
GAGANDEEP KAUR
09-04-2025
I used Excel to enter the user details like names, usernames, passwords, and departments. It
was easier to type and organize the data in rows and columns. Then, I saved it as a CSV file
on my Desktop so the script could read it easily.
In the above screenshot, it can be seen that I mentioned that I include all the fields means
first name, last name, username, password, department, and field.
2
The same with the script (making in Notepad). The script which is shown above is used to
automatically create multiple user accounts in Active Directory by reading details from a CSV
file and saving the script as the name of CreateUsers_Gagandeep.ps1. The .ps1 helps to run
the script file easily in PowerShell
The next step is creating an OU and there are two ways one is entering the following
command
Or other is by using Physical interface here I am doing by using Physical Interface . Firstly
open the server manager and click on Active directory users and computer
3
Then, I right-click on my domain and select new <OU. I named the OU Students_Gagandeep,
which is shown in the following Screenshot and one thing to notice here there is not users
yet I am going to do that by running the script in powershell
4
After running both commands, it was time to check whether it worked or not, and to
confirm that I did it the right way, I ran the following command
And by running above command I get the below result which shows I am good going
The next step I checked the log file to know which users were created successfully and if
there were any errors the users who already exists they are skipped
In the Previous screenshot of Students_Gagandeep OU who did not see any users but now
its showing that members or users which I Tried to create means I completed the
assignment .
6