Windows Server 2022 - AD DS
Windows Server 2022 - AD DS
Active Directory
Introduction to Windows Active Directory
Active Directory Domain Services provide support for locating and working
with these objects.
The data in this database can be modified using any alternative domain
controller.
Users can use the identity data stored in Active Directory from anywhere
in the network in order to access resources.
‹#›
Introduction to Windows Active Directory
‹#›
Introduction to Windows Active Directory
Logical components of the Active Directory help you structure the identity
infrastructure by considering design, administration, extensibility, security,
and scalability.
‹#›
Introduction to Windows Active Directory
‹#›
Introduction to Windows Active Directory
Forests
‹#›
Introduction to Windows Active Directory
The first domain controller in the Active Directory service creates the first
domain, it will create the forest as well.
Thus forests can contain multiple root domains as the forest can contain
multiple domain trees.
All the domains within an Active Directory Forest are bind with each other
by a two way trust relationship.
Two forests can not directly communicate with each other, means they do
not share the security (authentication) database.
‹#›
Introduction to Windows Active Directory
Domains
Domain trees
The root domain name within a domain tree is appended to the individual
domain names.
Forest – abc.int
Domain Domain
Tree Tree
‹#›
Introduction to Windows Active Directory
‹#›
Introduction to Windows Active Directory
Organizational units
Domain controllers
Functional Level
‹#›
Introduction to Windows Active Directory
The forest functional level decides which Windows server editions can be
added as a domain controller in any domain in the entire forest.
The forest functional level is set when you install the first domain controller
and create a forest and a domain also.
The Windows server edition present on that server decides the maximum
forest functional level that you can set.
If the OS on the first domain controller is Windows 2016 then you can set
forest functional level as Windows server 2016 which is the highest level.
You can set earlier OS versions like Windows Server 2012 R2, Windows
Server 2012 etc. As the forest functional level.
Whatever forest functional level you have set, you can then add that
Windows Server version or the higher version as the domain controller in
that forest.
The forest functional level can be changed
‹#› later also.
Introduction to Windows Active Directory
The domain functional level is same as forest functional level, however the
domain function level affects the domain only.
The forest function level is set when the forest is created.
But the domain functional level needs to be set each time you add a new
domain to the forest (Root domain or child domain).
Each domain can be set to have a different domain functional level.
The domain functional level can be higher than the forest functional level
but can not be lower than the forest functional level.
The domain functional level will affect on which Windows server OS can
be added as an additional domain controller or as Read only domain
controller in the domain.
The domain functional level can be changed later.
‹#›
Introduction to Windows Active Directory
The global catalog server holds the full writeable copy of objects in its host
domain and the partial copy of the objects in other domains in the same
forest.
The partial replica contains a copy of every object in the forest and the
most commonly used attributes used by queries.
Applications and users in one domain can query for the objects in another
domain (sameforest) via the global catalog server.
All domain controllers in the domain will not be a global catalog server by
default.
When installing the first domain controller, it will become the global catalog
server, and other domain controllers can promote them as global catalog
servers according to business requirements.
Every domain controller in the domain does not need to be a global
catalog server. ‹#›
Introduction to Windows Active Directory
The domain controller also informs the client whether the chosen domain
controller is the closest one to it.
The client caches the site information provided by the domain controller in
Atlanta, queries for the site-specific service (SRV) resource record (a
Domain Name System (DNS) resource record used to locate domain
controllers for AD DS) and thereby finds a domain controller within the
same site.
By finding a domain controller in the same site, the client avoids
communications over WAN links.
If no domain controllers are located at the client site, a domain controller
that has the lowest cost connections relative to other connected sites
advertises itself (registers a site-specific service (SRV) resource record in
DNS) in the site that does not have a domain controller.
The domain controllers that are published in DNS are those from the
closest site as defined by the site topology. This process ensures that
every site has a preferred domain controller
‹#› for authentication.
Introduction to Windows Active Directory
‹#›
Introduction to Windows Active Directory
Connection object
A connection object is an Active Directory object that represents a
replication connection from a source domain controller to a destination
domain controller.
A domain controller is a member of a single site and is represented in the
site by a server object in Active Directory Domain Services (AD DS).
Each server object has a child NTDS Settings object that represents the
replicating domain controller in the site.
For replication to occur between two domain controllers, the server object
of one must have a connection object that represents inbound replication
from the other.
All replication connections for a domain controller are stored as
connection objects under the NTDS Settings
‹#› object.
Introduction to Windows Active Directory
Subnet
A subnet is a segment of a TCP/IP network to which a set of logical IP
addresses are assigned.
Subnets group computers in a way that identifies their physical proximity
on the network.
Subnet objects in AD DS identify the network addresses that are used to
map computers to sites. ‹#›
Introduction to Windows Active Directory
Site link
Site links are Active Directory objects that represent logical paths that the
KCC uses to establish a connection for Active Directory replication.
A site link object represents a set of sites that can communicate at uniform
cost through a specified intersite transport.
All sites contained within the site link are considered to be connected by
means of the same network type.
Sites must be manually linked to other sites by using site links so that
domain controllers in one site can replicate directory changes from domain
controllers in another site.
Because site links do not correspond to the actual path taken by network
packets on the physical network during replication, you do not need to
create redundant site links to improve Active Directory replication
efficiency.
‹#›
Introduction to Windows Active Directory
A site link bridge is an Active Directory object that represents a set of site
links, all of whose sites can communicate by using a common transport.
Site link bridges enable domain controllers that are not directly connected
by means of a communication link to replicate with each other.
Typically, a site link bridge corresponds to a router (or a set of routers) on
an IP network.
Site link bridges are only necessary if a site contains a domain controller
hosting a directory partition that is not also hosted on a domain controller
in an adjacent site, but a domain controller hosting that directory partition
is located in one or more other sites in the forest.
Adjacent sites are defined as any two or more sites included in a single
site link.
‹#›
Introduction to Windows Active Directory
‹#›
Introduction to Windows Active Directory
The GUID value will be saved in the objectGUID attribute in each object
and the SID value will be saved in the objectSid attribute in each object.
In order to view the GUID and SID values for the user account, the
following PowerShell command can be run from the domain controller:
Get-ADUser username
The SID value for an object is unique within its domain. The SID values
associated with the user will be changed if the user object is migrated to
another domain.
An SID value assigned by one domain will not be accepted by another
domain.
As soon as a user object is migrated to another domain, a new SID value
will be generated.
Then, the old SID value will be saved in the sIDHistory attribute.
This attribute can contain multiple values.
When the system creates a Kerberos ticket for user authentication, it will
consider a new SID value and all other SID values listed in the sIDHistory
attribute.
sIDHistory is important,especially in Active Directory restructuring.
The resources in the domain decide access or deny permissions to a user
account based on their access control list (ACL).
‹#›
Introduction to Windows Active Directory
Distinguished names
‹#›
Introduction to Windows Active Directory
There are three types of Active Directory naming attributes that have been
used to generate distinguished names:
domainComponent (DC): This is the naming attribute for the domain and
the DNS. If the DNS name for the domain is abc.int, the domain
component for it will be DC=abc,DC=int.
commonName (CN): This refers to the objects and containers within the
directory.
The distinguished name for a user will be as follows:
CN=user1,OU=sales,DC=abc,DC=int
‹#›
Windows Active Directory
Creating a new forest
The steps mentioned in this document can be performed on Windows Server 2012 R2 and
above.
This is the first step in installing Active Directory in any organization. This step will create the
first forest and first domain in an organization. Once a Forest and a Domain is created,
additional domains (either child or root domain) can be created in that forest. Also
additional domain controllers also can be added to the required domains.
Prerequisites :-
Steps:-
In the right side pane, click the option in front of Time zone.
On the new window that opens click the Change Time one button. In the new
window that opens, use the drop down list to select appropriate time zone.
Click Ok. After you select the time zone, the time displayed will change. Make sure
the time displayed is the current time displayed as per your location. Click OK to
close the window.
If the selected time zone is not shown in the Server Manager in front of Time zone
option, click refresh button to refresh the Server Manager window.
In that window double click the Internet Protocol Version 4(TCP/IPv4) option.
A new window is displayed. Select the Use the following IP address option. Then
provide the required IP address and subnet mask.
For Lab purpose default gateway and DNS server configuration is not required. Click
OK.
Then click OK on earlier windows and close all the windows opened. Do not close
the Server Manager window.
Again if the given IP address is not displayed in the Server Manager window, Click
the refresh button.
C. Set a computer name for the server.
After this step, you need to restart the server.
To assign a computer name to the server, in the Server Manager click any option -
Computer Name or Workgroup. It will open the same window.
This will open following window. In the Computer Name field specify a name for this server.
Do not change anything in the workgroup field.
Click OK. It will display a restart warning. Click OK to close all earlier windows. The server
restart option will be displayed. Click Restart Now and restart the server. This will bring the
new computer name in effect.
Click Next on all the screens displayed till the following screen is displayed.
In this screen, select the check box in front of Active Directory Domain Services role. As the
check box is selected following screen is displayed.
Click Install button to start installing the ADDS role on the server.
Once the installation is complete, following screen will be displayed.
Make sure the installation succeeded without any errors. Click Close.
Select Add a new forest option and specify a Root domain name.
This will create a new forest by the same name as provided for the Root domain. Thus a new
forest and a new domain tree will be created.
Click Next.
In this window you need to set the Forest Functional Level and Domain Functional Level.
The Forest functional level decides the Windows Server editions that can be added as
domain controllers in the entire forest. If the forest functional level is set to Windows server
2016 then only Server 2016 and above server editions like 2019 and 2022 can be added as
domain controllers. In other words if you want to add another domain in this forest, the
server on which you install ADDS service, needs to have a Windows Server 2016/2019/2022
operating system installed. Earlier Server versions like 2012 R2 will not be allowed. An error
will be displayed if you try to add this server.
The Domain Functional level depends on the Forest Functional Level. The Domain
Functional level can be same or higher than Forest Functional level. However it can not be
lower than forest functional level. The Domain functional level decides which Windows
Serve editions can work as additional domain controllers within a domain.
Here for this practical we keep both Forest Functional level and Domain Functional level to
default. The default option displayed depends on the Windows Server OS installed on this
server.
Keep all other options as default.
Type a Directory Restore Mode Password (DSRM).
This password is required when the active directory fails. The password provided should be
complex means it needs a capital letter, Special character and small characters. As we are
installing active directory on this server its SAM database (the database that holds
usernames and passwords) is disabled. All the usernames and their passwords will be stored
in the active directory database. You always take backup of this database. Thus when this
database fails no username and password is available for logon. Thus this DSRM password
will allow you to logon to server and restore your active directory database from backup.
The server can be started into a DSRM mode by pressing F8 button when the server starts.
Thus keep all settings as default. Provide DSRM password. Click Next.
Following screen is displayed.
Windows active directory requires a working DNS server. However we do not have any DNS
sever installed. Thus above warning screen is displayed. Click Next.
The following screen checks the NetBIOS domain name of the given domain name. It varifies
that the domain name is not in use. The NetBIOS protocol does not support Internet naming
style like demo.labs. Thus it removes the anything after . and keeps the starting name as the
NetBIOS domain name. This is for the backward compatibility with older operating systems
like Windows NT etc. Click Next.
The next screen displays the directory paths where the active directory database and active
directory logs will be stored. The sysvol folder is used to replicate data to other domain
controllers and domain clients. This folder should be placed on an NTFS formatted partition.
The installer will verify that all the required prerequisites are met and the ADDS can be
successfully configured on this server.
If there is any red coloured warning message, the Install button will be disabled. In such
case read the error carefully and solve the problem.
Any warning with yellow signs can be neglected and will not create any problems for ADDS
configuration.
Click Install.
This will start configuring ADDS service. Once it finishes, following message will be displayed.
Once the server starts and you go the logon scree, it looks like as shown below.
This is how you have successfully installed the ADDS role on this server. You configured
ADDS on this sever to create a new forest and a new domain. This server is now domain
controller for the domain demo.lab.
Windows Active Directory
Adding an Additional Domain Controller to an existing domain
The steps mentioned in this document can be performed on Windows Server 2012 R2 and
above.
This step adds another server to an existing active directory domain as Additional Domain
Controller (ADC). The ADC server holds the same active directory database as the main
Domain Controller. Thus creating this server solves 2 problems. First in case if the main
Domain controller fails, the ADC will work and provide services to clients.
The second problem it solves is by reducing WAN traffic between branch office and head
office. For this an ADC is required to be places in the branch office. This will help clients in
the branch office get active directory services like authentication locally. Thus clients do not
need to contact the DC/ADC in the head office.
Prerequisites :-
***Perform following steps on the second server which will be working as an additional
domain controller.
Steps:-
In the right side pane, click the option in front of Time zone.
On the new window that opens click the Change Time one button. In the new
window that opens, use the drop down list to select appropriate time zone.
Click Ok. After you select the time zone, the time displayed will change. Make sure
the time displayed is the current time displayed as per your location. Click OK to
close the window.
If the selected time zone is not shown in the Server Manager in front of Time zone
option, click refresh button to refresh the Server Manager window.
In that window double click the Internet Protocol Version 4(TCP/IPv4) option.
A new window is displayed. Select the Use the following IP address option. Then
provide the required IP address and subnet mask.
Make sure you provide the main DC server IP address in the Preferred DNS Server.
Again if the given IP address is not displayed in the Server Manager window, Click
the refresh button.
C. Set a computer name for the server.
After this step, you need to restart the server.
To assign a computer name to the server, in the Server Manager click any option -
Computer Name or Workgroup. It will open the same window.
This will open following window. In the Computer Name field specify a name for this server.
Do not change anything in the workgroup field.
Click OK. It will display a restart warning. Click OK to close all earlier windows. The server
restart option will be displayed. Click Restart Now and restart the server. This will bring the
new computer name in effect.
To install ADDS, in the Server Manager window, click the Manage option.
Click Next on all the screens displayed till the following screen is displayed.
In this screen, select the check box in front of Active Directory Domain Services role. As the
check box is selected following screen is displayed.
Make sure the installation succeeded without any errors. Click Close.
Click Change button in the Supply the credentials to perform this operation.
In the new window that opens, provide the username and password of the main DC server.
Make sure you provide the username with domain name as shown below.
Provide a DSRM password. As you know this password will be required for recovering active
directory database from backup.
Click Next.
Following screen is displayed.
Windows active directory requires a working DNS server. However we do not have any DNS
sever installed. Thus above warning screen is displayed. Click Next.
The next screen displays the options about how this server will get the copy of the existing
active directory domain database. As you know that ADC holds the same database as the
main domain controller.
The Install from media option helps you install the active directory domain database from a
backup device like tape or external USB drive. This option is useful while installing ADC in
branch offices. For a branch office where low speed WAN link is present, using this option
helps save time and network traffic. You need to send the database backup to the branch
office before you start this process.
However for all LAN and high speed WAN installations replicate from option is used.
If you already have multiple domain controllers within a domain then the drop down button
in front of Replicate from will display a list of all these domain controllers.
The default Any Domain controller option will select one of the available domain controller.
Make sure all selected options on the earlier screens are correct.
To finally configure the ADDS as per the settings , click Next.
The installer will verify that all the required prerequisites are met and the ADDS can be
successfully configured on this server.
If there is any red coloured warning message, the Install button will be disabled. In such
case read the error carefully and solve the problem.
Any warning with yellow signs can be neglected and will not create any problems for ADDS
configuration.
Click Install.
This will start configuring ADDS service. Once it finishes, following message will be displayed.
Once the server starts and you go the logon scree, it looks like as shown below.
A. Logon to the main domain controller and create a user in an organizational unit.
After you logon to the man DC as administrator, in the Server Manager window click Tools
option. In the menu displayed click Active Directory Users and Computers.
In the Active Directory Users and Computers window, expand the domain name shown.
Then right click on the domain name. Go to the New option in the displayed menu. Then
click Organizational Unit option as shown below.
In the new window that opens provide a name for the organizational unit(OU). Click OK.
Once the OU is created , right click the name of the OU. Then select New option in the menu
displayed. Click User to create a user inside the OU. This is show below.
In the new window that opens provide First name, Full name and User logon name as shown
below.
Click Next.
In the new window that opens , provide a password for the new user. Also deselect the
checkbox from User must change password at next logon.
B. Logon to the Additional Domain Controller and Open Active Directory Users and
Computers.
Logon to the ADC as administrator. Go to Tools option in the Server Manager. The click
Active Directory Users and Computers . The following window opens.
Both the Domain controllers should show the OU created above and also the user within it
as shown below.
Also create an OU and a user within it on the Additional Domain Controller and verify that it
automatically reflects in the main Domain Controller.
This is how you have successfully installed the ADDS role on this server. You configured
ADDS on this sever to add this server as a Additional Domain Controller (ADC) in your
existing domain. This server is now additional domain controller for the domain demo.lab.
Windows Active Directory
Removing an Additional Domain Controller from an existing domain
The steps mentioned in this document can be performed on Windows Server 2012 R2 and
above.
This step removes an additional domain controller server from an existing active directory
domain . This is required when an ADC is no longer required like a branch office is closed and
all the IT setup is removed. This step is also required when you want to replace the existing
ADC with a new server with higher hardware configuration. In this case you remove the old
ADC first and then add the new ADC to the domain.
Prerequisites :-
Steps:-
1. Demote The additional domain controller
To perform this step, logon to ADC as administrator. In the Server Manager window, click
Manage and select Remove Roles and Features option.
Un-check the check box for the Active Directory Domain Services. As soon as you un-check
the box, following screen is displayed.
Click Next.
Do not select the check box of Force the removal of this domain controller option.
This option should be used only when the normal removal fails or this domain controller is
not able to connect to the main DC.
On this screen click check box in front of Proceed with removal. Click Next.
On the next screen that appears, you need to enter a password for the administrator
password. As you are aware that when you made this server as ADC, its SAM file was
disabled. Now as you are demoting the server, its SAM file will be enabled.
On this screen provide a password and click Next.
It will start the demotion process. It will take some time. Once the demotion process is
complete, following screen is displayed.
Once the server restarts, logon as administrator. The server is demoted as a member server.
However the Active Directory Domain Services role is not yet removed.
2. Remove the Active Directory Domain Services (ADDS)
After restart when you logon to the server, you can see the yellow triangle near the flag sign
in Server Manager. This is as shown below.
This appears because the Active Directory Domain Services (ADDS) role is not removed.
To remove this role, Click Manage and select Remove Roles and Features option.
Click Next on all screens till you get the following window.
Un-check the check box for the Active Directory Domain Services. As soon as you un-check
the box, following screen is displayed.
Click Close.
This is how you have successfully demoted the server from Additional Domain Controller
(ADC) to a member server. This server is now a member server of the domain demo.lab.
Windows Active Directory
Add a client to a domain
The steps mentioned in this document can be performed on any Windows 7/10/11 or
Windows Server operating system.
Once you have deployed a new forest and a new domain, next step is to add the clients to
the domain. This helps you manage the computers and users from a centralized location
(Domain Controller).
Prerequisites :-
1. A Windows machine with any Windows installed either on physical server or on a virtual
machine. For this document Windows Server 2016 Evaluation version is used.
2. An existing forest and a domain with its domain controller up and running.
3. Basic knowledge about Windows Active Directory and its terms like Forest, Domain,
Domain Controller, Additional Domain Controller etc.
Steps:-
In the right side pane, click the option in front of Time zone.
On the new window that opens click the Change Time one button. In the new
window that opens, use the drop down list to select appropriate time zone.
Click Ok. After you select the time zone, the time displayed will change. Make sure
the time displayed is the current time displayed as per your location. Click OK to
close the window.
If the selected time zone is not shown in the Server Manager in front of Time zone
option, click refresh button to refresh the Server Manager window.
In that window double click the Internet Protocol Version 4(TCP/IPv4) option.
A new window is displayed. Select the Use the following IP address option. Then
provide the required IP address and subnet mask.
For Lab purpose default gateway and DNS server configuration is not required. Click
OK.
Then click OK on earlier windows and close all the windows opened. Do not close
the Server Manager window.
Again if the given IP address is not displayed in the Server Manager window, Click
the refresh button.
C. Set a computer name for the server.
After this step, you need to restart the server.
To assign a computer name to the server, in the Server Manager click any option -
Computer Name or Workgroup. It will open the same window.
Click OK. It will display a new window asking for username and password.
Please enter the administrator username and password of the main DC. Click OK.
A welcome to domain message is displayed as shown below.
Click OK.
A restart warning is displayed.The server restart option will be displayed. Click Restart Now
and restart the server. This will bring the new computer name in effect and add the sever to
the domain as member.
If you logon directly as Administrator, it will be a local logon. However you will not be able to
access domain computers. You will get a username and password prompt.
To logon to domain, click the Other User option on the screen. The following screen is
displayed.
Now enter the username in the following format to logon to domain.
Make sure the domain name is shown in the Sign in to option below the username and
password field.
This is how you have successfully added a server as a member server to the domain.This
server is now domain member in the domain demo.lab.