# Configuring Active Directory on Windows Server

Active Directory is a directory service developed by Microsoft for Windows domain networks. It provides a centralized system for managing authentication and authorization of users and computers. Key components include:

* **Domain Controllers**: Servers that manage the AD database and authenticate users.
    
* **Organizational Units (OUs)**: Containers that help organize objects within a domain.
    
* **User Accounts and Groups**: Used to manage access to resources and permissions.
    

### What is Active Directory?

Active Directory is a directory service developed by Microsoft for Windows domain networks. It stores information about users, devices, and network resources, making it possible to centrally manage and control access. With AD, network administrators can set group policies, manage authentication, and monitor user activity within the domain.

### Prerequisites

Before you start configuring Active Directory on Windows Server, ensure you have:

* **A Windows Server installation** (Windows Server 2012, 2016, or later).
    
* **A static IP address** configured on your server.
    
* **Administrator privileges** on the server.
    

### **Installing Active Directory Domain Services**

**<mark>Step 1: Install AD DS Role</mark>**

**Open Server Manager**: Launch Server Manager from the Start menu.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725734336844/26827736-9e19-4a31-b5d9-d13e8705d549.png align="center")

**Add Roles and Features**: Click on **Add roles and features**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725734146539/b6a654b0-bf43-49ec-b631-8fd740bcbb35.png align="center")

**Server Selection**: Click **Next** until you reach the **Server Roles** page.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725734528023/8982da95-2de7-40d2-aca6-a7aa864cb521.png align="center")

**Select Active Directory Domain Services**: Check the **Active Directory Domain Services** checkbox.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725734641430/1971b321-9c12-4206-a4f7-f9cc843c7991.png align="center")

**Complete the Wizard**: Click **Next** through the remaining screens and then **Install**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725734793379/a35c5c71-0ecd-4e9f-aec9-0e2ce3301369.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725734906663/82b04827-50cd-4d2d-8718-65a9ad707726.png align="center")

**<mark>Step 2: Promote the Server to a Domain Controller</mark>**

**Open AD DS Configuration Wizard**: Once the installation is complete, click on the notification flag in Server Manager and select **Promote this server to a domain controller**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725735110517/cf583791-5438-4ea3-9d0a-21e8fd0eacbb.png align="center")

**Deployment Configuration**:

Choose **Add a new forest** if this is the first domain controller. &gt; Enter a **Root domain name** (e.g., `example.local`).

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725735256779/98e641ae-b85f-4db8-8a0e-584ef1e5364d.png align="center")

**Domain Controller Options**:

* Choose a **Forest functional level** and **Domain functional level**.
    
* Enter a **Directory Services Restore Mode (DSRM) password**.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725735409016/f3007dbf-cb94-40f9-a949-159ad6fcc006.png align="center")

**Review Options and Install**: Review your selections and click **Install**. The server will be restarted after installation.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725735542121/f392f85e-0412-4182-a075-5f11606cb670.png align="center")

### Creating **Organizational Unit**

**Launch Active Directory Users and Computers**: From Server Manager, go to **Tools** &gt; **Active Directory Users and Computers**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725736258144/d8ccee83-8f6b-4309-98ee-cbba1db09006.png align="center")

Right-click on the **Domain Name** or any existing **Organizational Unit (OU)** where you want to create the new OU.

* From the context menu, hover over **New** and then click **Organizational Unit**.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725738328680/55415f42-c974-4f61-8869-637c1f12f049.png align="center")

In the **New Object - Organizational Unit** window:

* **Name**: Enter the name for your new OU (e.g., "HR", "IT Dept"). &gt; Click **OK** to create the OU.
    
* ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725738638456/d5bdd317-805d-4e6c-af54-56cce3f86816.png align="center")
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725738759613/1038619d-7a38-48c4-9ebd-2363d835854f.png align="center")

### **Creating User Accounts**

**<mark>Step 1: Open Active Directory Users and Computers</mark>**

**Launch Active Directory Users and Computers**: From Server Manager, go to **Tools** &gt; **Active Directory Users and Computers**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725736258144/d8ccee83-8f6b-4309-98ee-cbba1db09006.png align="center")

**<mark>Step 2: Create a New User</mark>**

**Navigate to the Desired OU**: In the Active Directory Users and Computers console, expand your domain and select the Organizational Unit (OU) where you want to create the user.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725736533080/a60bf4c6-a7a8-464a-a372-e95d6e622faa.png align="center")

**Create User**:

* Right-click the OU, select **New** &gt; **User**.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725736927157/d0f776e7-f4c6-4837-a033-f8ab70f4da9a.png align="center")

Enter the **First name**, **Last name**, and **User logon name**. &gt; Click **Next**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725736637022/b54338ea-ef87-4978-b9ad-c979327e5e27.png align="center")

Set a **Password** for the user.

* Choose options for **Password must change at next logon** or **User cannot change password** as needed. &gt; Click **Next**
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725736728358/bc855af4-ff6a-4943-a350-61a68ccbe261.png align="center")

* Click **Finish** to create the user.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725736760114/d789ec22-93d8-4c49-a27e-d374fde842ba.png align="center")

**<mark>Step 3: Manage User Properties</mark>**

**Edit User Details**: Right-click on the user account and select **Properties**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725737099455/cb512e9f-b160-4a2e-8a8e-5b86e3224f00.png align="center")

**Modify Attributes**: You can edit details such as **Contact Information**, **Member Of** (for group membership), and **Profile** settings.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725737171153/8086f99b-f2bd-43e7-b172-399656cf46e1.png align="center")

### **Creating Groups**

**<mark>Step 1: Create a New Group</mark>**

1. Open **Active Directory Users and Computers**
    
2. **Navigate to the Desired OU**: Select the OU where you want to create the group.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725737311192/e71c3c31-17da-414f-832c-19fab8a0d855.png align="center")

**Create Group**:

* Right-click the OU, select **New** &gt; **Group**.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725737459931/5caa57bc-5830-4dd6-b3e6-90425b359ff2.png align="center")

Enter a **Group name** and select the **Group scope** (Global, Domain Local, or Universal) and **Group type** (Security or Distribution).

* Click **OK** to create the group.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725737396771/a96f50c0-b6d0-405e-9eb6-d113cee5f9f1.png align="center")

**<mark>Step 2: Add Members to the Group</mark>**

**Edit Group Membership**:

* Right-click on the group and select **Properties**.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725737578116/29c2273e-f208-49db-9cfa-bb31f09950a8.png align="center")

Go to the **Members** tab and click **Add**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725737677618/18ef681d-61a0-4535-b6fb-6d89dd20651e.png align="center")

Enter the names of users or other groups to add as members. &gt; Click **OK** to update the group membership.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725737747234/aebf9f29-95f9-4aa9-8828-902e718b4f96.png align="center")

### **Conclusion**

Configuring Active Directory is a fundamental task for managing a Windows Server environment. By setting up user accounts and groups, you can control access to resources and enforce security policies effectively. Regularly review and maintain your AD configuration to ensure it meets the needs of your organization and supports your IT infrastructure.
