Lab 2 - Creating and Managing AD Users and Computers
Lab 2 - Creating and Managing AD Users and Computers
Creating and Managing Active Directory Users, Computers, groups and organizational
unit
In this exercise, you use the Active Directory Users and Computers console to create an OU
and a domain user account.
Create OU
3. On the DC1 computer, in the Active Directory Users and Computers console, Right-
click on your domain, then select New -> Organizational Unit. The New Object -
Organizational Unit appears
4. In the Name text box, type People Organizational Unit
Create a User
1. On the DC1 computer, in the Active Directory Users and Computers console, select the
People Organizational Unit.
2. From the Action menu, select New > User. The New Object – User Wizard appears
3. In the First name text box, type <Your first name> and in the Last name text box, type
<Your last name>.
4. In the User logon name text box, type <your login name> and click Next. The second
page of the New Object – User Wizard appears
5. In the Password and Confirm password fields, type password.
6. Clear the User must change password at next logon check box and click Next. A
confirmation page listing the settings you configured appears.
7. Click Finish.
1. On the DC1 computer, in the Server Manager console, select Tools > Active
Directory Administrative Center. The Active Directory Administrative Center
console appears.
2. In the left pane, select Your domain (local) node and, in the center pane, double-click
the Computers container. The contents of the Computers container appears in the center
pane.
3. In the right pane, select New -> Computer. The Create Computer dialog box appears
4. In the Computer name text box, type Wkstn8.
5. Under Member of, click Add. The Select Groups dialog box appears.
6. In the Enter the object name to select box, type Domain Computers and click OK. The
group appears in the Member Of text box.
7. Click OK. The new object appears in the Computers container.
8. In the left pane, select Your domain (local) node and, in the center pane, double-click
the People OU. The contents of the People container appears in the center pane
9. In the right pane, select New -> User. The Create User dialog box appears
10. In the First name text box, type <User’s first name>, and in the Last name text box,
type <User’s last name>.
11. In the User SamAccountName Logon text box, type <user login>. In the Password
and Confirm password fields, type Pa$$w0rd.
12. Scroll down and, in the Member of section, click Add. The Select Groups dialog box
appears.
13. In the Enter the object name to select text box, type Domain Users and click OK.
The group appears in the Member Of text box.
Click OK. The new user object appears in the People OU.
Hint:
- To create OU use cmdlets:
New-ADOrganizationalUnit [-Name] <string> [-path <string>]
New-ADOrganizationalUnit –Name CIT –path “OU=CIT,dc=clc,dc=com”
1. On the DC1 computer, in the Active Directory Users and Computers console, select
the OU CIT
2. Right-click the CIT OU and, from the context menu, click New > Group. The New
Object - Group dialog box appears
In this exercise, the students are requested to create the user account for students of Can Tho
University. The students are given a list of users, which consist of the following information:
student’s number, Full Name and class name. Based on this information, the students are
requested to:
1. Create a list of OUs with the following structure: CTU -> faculty -> school year -> Class
CTU K41
DI1895A1
K42
KCN DI18V7F1
K43
KCNTT DI1895A2
K44
DI18V7A1
K45
DI18V7A2
K46
KKT DI18Z6A1
KNN
KSP
Hint
There are multiple methods to create multiple OUs and user accounts at the same time,
including:
a) Powershell cmdlets: New-ADOrganizationalUnit and New-ADUser
b) LDIFDE command
c) CSVDE command
Each method requires input file with different structure
The students are given the list of users with the structure as shown in the following table. The
students have to extract the necessary information from this table and create the input file for
the respective command.
With the provided table, the student can extract the following information:
1) Faculty: The first two character of the field “Ten lop”
DI = KCNTT; TN = KCN; DA= VCNSH; FL=KNNg; KH = KKH; KT=KKT; LK=KL;
MT=KMT-TNTN; NN=KNN; TD=TDTT; TS=KTS; XH=KXH-NV
2) School year: The next two character:
15 = K41; 16 = K42; 17 = K43; 18=K44; 19=K45; 20=K46; 21=K47
2. To create a list of users: create a Powershell script file (e.g., create_uers.ps1) each
cmdlet in a line:
The following cmdlet create a user account with username (SAMAccountName)
B1607052 and pasword rw0pEZP@n
The students are requested to use Excel and VBA script to create these cmdlet automatically
(including random pasword)
Using CSVDE command:
1. To create a list of OUs: create a csv file (e.g., create_ou.csv) with the following structure:
objectClass, dn
Organizational Unit, ou=KCNTT,OU=CTU,dc=clc,dc=com
Organizational Unit, ou=KCN,OU=CTU,dc=clc,dc=com
Organizational Unit, ou=K43,ou=KCNTT,OU=CTU,dc=clc,dc=com
Organizational Unit, ou=K41,ou=KCN,OU=CTU,dc=clc,dc=com
Organizational Unit, ou=K42,ou=KCNTT,OU=CTU,dc=clc,dc=com
Organizational Unit, ou=K42,ou=KCN,OU=CTU,dc=clc,dc=com
Organizational Unit, ou=K43,ou=KCN,OU=CTU,dc=clc,dc=com
From the command prompt, run the following command: csvde –i –f create_ou.csv -k
2. To create a list of users: create a csv file (e.g., create_uers.txt) with the following
structure:
Note: by default, Active Directory don’t allow to ad user without pasword. Therefore, to run
the above command we have to modify group policy to not enforce security policy