Active Directory (AD) is Microsoft’s directory service for Windows networks: it keeps every user, computer, and group in one central database on servers called domain controllers, and uses that database to check who is signing in and what they’re allowed to open. One account works on any computer in the organization, and IT changes a password, a permission, or a security setting once instead of on every machine.
Active Directory has been the backbone of business and school networks since Windows 2000, and it’s still running in most organizations that use Windows, often alongside Microsoft’s cloud identity service, Entra ID. This guide explains what Active Directory does, the terms you’ll hear (domain, forest, OU, GPO), how a sign-in actually works, how to manage it with PowerShell, and how to keep it secure.
What Does Active Directory Do?
Without a directory, each computer keeps its own list of local accounts. With ten people and ten computers, that’s up to a hundred accounts to create, update, and remove by hand. Active Directory replaces those lists with one shared directory. It handles four jobs:
- Identity. It stores an account for each person and each computer, with attributes such as name, email, department, and manager.
- Authentication. It checks that you are who you say you are when you sign in to a computer, a file share, or an app. This is the “who are you?” question from Authentication, Authorization, and Accounting (AAA) Explained.
- Authorization. Groups in AD decide what you can reach: the Finance share, the HR printer, the admin tools.
- Central management. Group Policy pushes settings (password rules, screen lock, mapped drives, software) to every computer and user in the domain.
The technical name for the core service is Active Directory Domain Services (AD DS). When people say “Active Directory,” they almost always mean AD DS.
Key Active Directory Terms
| Term | What it means |
|---|---|
| Object | Anything stored in the directory: a user, computer, group, printer, or shared folder. |
| Domain | The basic unit of AD, with its own name (for example ad.example.com), accounts, and security policies. |
| Domain controller (DC) | A Windows Server that holds a copy of the directory and answers sign-in requests. Most domains have at least two. |
| Tree | One or more domains that share a contiguous name, such as ad.example.com and sales.ad.example.com. |
| Forest | The top-level container: one or more trees that share a schema and trust each other. The forest is the real security boundary. |
| Organizational unit (OU) | A folder inside a domain for organizing objects (for example by department or campus) and for applying Group Policy and delegating admin rights. |
| Group | A collection of users, computers, or other groups, used to grant permissions or send email. |
| Group Policy Object (GPO) | A set of settings linked to a site, domain, or OU and applied to the computers and users inside it. |
| Schema | The rules for which object types and attributes the directory can hold. |
| Global catalog | A domain controller that also holds a partial copy of every object in the forest, so searches across domains are fast. |
| Site | A group of well-connected IP subnets, usually one physical location. Sites control which DC a computer talks to and how DCs replicate. |
| Trust | A link that lets users in one domain or forest access resources in another. |
OUs vs. Groups
This is the distinction beginners mix up most often:
- An OU is where an object lives. Each object sits in exactly one OU. You use OUs to apply Group Policy and to delegate control (for example, letting the help desk reset passwords only in the Students OU).
- A group is a list of members. One user can belong to many groups. You use groups to grant access to files, apps, and other resources.
Putting a user in the Finance OU doesn’t give them access to the Finance share. Adding them to the Finance group does.
Group Types and Scopes
Groups come in two types: security groups, which grant permissions, and distribution groups, which are only email lists. Security groups also have a scope:
| Scope | Can contain | Typically used for |
|---|---|---|
| Domain local | Users and groups from any trusted domain | Granting permission to a resource in its own domain |
| Global | Users and groups from its own domain | Grouping people by role or department |
| Universal | Users and groups from any domain in the forest | Roles that span several domains |
A long-standing Microsoft recommendation is AGDLP: put Accounts into Global groups, put those into Domain Local groups, and grant Permissions to the domain local groups. In a small single domain you can simplify this, but the idea holds: grant permissions to groups, never to individual users.
How an Active Directory Sign-In Works
When you press Ctrl+Alt+Del on a domain-joined computer and type your password, three protocols work together:
- DNS finds a domain controller. The computer asks DNS for the domain’s service records (such as
_ldap._tcp.dc._msdcs.ad.example.com) and picks a DC, preferably one in its own site. This is why broken DNS is the most common cause of AD problems. - Kerberos checks your password. The DC’s Key Distribution Center gives your computer a ticket-granting ticket (TGT) after confirming you know the password. The password itself is never sent across the network.
- When you open a file share or another service, your computer trades the TGT for a service ticket for that server. The server accepts the ticket without asking for your password again. That’s single sign-on inside the network.
- LDAP is used to look things up in the directory: your group memberships, your manager, the Group Policy that applies to you.
Older systems may fall back to NTLM, an older challenge-response protocol. It still works, but it’s weaker than Kerberos, and Microsoft has announced plans to phase it out of Windows.
Ports Active Directory Uses
If a firewall sits between computers and domain controllers, these ports need to be open:
| Port | Protocol | Used for |
|---|---|---|
| 53 TCP/UDP | DNS | Finding domain controllers |
| 88 TCP/UDP | Kerberos | Sign-in and tickets |
| 135 TCP | RPC endpoint mapper | Replication and management |
| 389 TCP/UDP | LDAP | Directory lookups |
| 445 TCP | SMB | Group Policy files (SYSVOL) and file shares |
| 464 TCP/UDP | Kerberos password change | Changing passwords |
| 636 TCP | LDAPS | LDAP over TLS |
| 3268 / 3269 TCP | Global catalog (LDAP / LDAPS) | Forest-wide searches |
RPC also uses a range of high dynamic ports (49152–65535 by default). For more on ports, see What Are the Well-Known Port Numbers?
Group Policy in a Nutshell
Group Policy is often the reason organizations adopt Active Directory. A GPO can:
- Enforce password length and account lockout rules
- Lock the screen after a few minutes of inactivity
- Map network drives and printers
- Deploy software and Windows settings
- Disable USB storage or block specific programs
GPOs apply in a fixed order: local policy first, then site, domain, and OU (parent OU before child OU), remembered as LSDOU. When two policies set the same option, the one applied last wins, so the OU closest to the object has the final say. Computers refresh policy at startup and about every 90 minutes; run gpupdate /force to apply changes right away and gpresult /r to see which GPOs a computer and user received.
Active Directory vs. Microsoft Entra ID
Microsoft Entra ID (called Azure Active Directory until 2023) shares the name but is a different product.
| Active Directory (AD DS) | Microsoft Entra ID | |
|---|---|---|
| Where it runs | Your own Windows Servers (domain controllers) | Microsoft’s cloud |
| Built for | Windows computers, file shares, and servers on your network | Cloud apps such as Microsoft 365 and SaaS tools |
| Sign-in protocols | Kerberos, NTLM, LDAP | SAML, OpenID Connect, OAuth 2.0 |
| Structure | Forests, domains, OUs, Group Policy | Flat tenant with groups, Conditional Access |
| Device management | Group Policy | Microsoft Intune |
Many organizations run both in a hybrid setup: accounts are created in on-premises AD and synced to Entra ID with Microsoft Entra Connect (or its lighter cloud-sync agent), so people use one username and password everywhere. Organizations that moved fully to the cloud may skip AD DS entirely and manage devices with Microsoft Intune.
Other Active Directory Services
Microsoft uses the Active Directory name for several related server roles:
- AD Certificate Services (AD CS): runs your own certificate authority for Wi-Fi, VPN, and smart-card certificates.
- AD Federation Services (AD FS): provides single sign-on to web apps using your AD accounts. Microsoft now recommends Entra ID for most of these cases.
- AD Lightweight Directory Services (AD LDS): a stand-alone LDAP directory for applications, without domains or Group Policy.
Managing Active Directory
Most day-to-day work happens in a few tools, installed on a domain controller or on a Windows 10/11 admin workstation with the Remote Server Administration Tools (RSAT):
- Active Directory Users and Computers (ADUC): the classic console for users, groups, and OUs.
- Active Directory Administrative Center (ADAC): a newer console that also includes the AD Recycle Bin and fine-grained password policies.
- Group Policy Management Console (GPMC): creates, links, and reports on GPOs.
- PowerShell: the fastest way to do anything in bulk.
Active Directory with PowerShell
Install the Active Directory PowerShell module first. On Windows 10 or 11 (run as administrator):
Add-WindowsCapability -Online -Name Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0
On Windows Server:
Install-WindowsFeature RSAT-AD-PowerShell
Look up a user and when they last signed in:
Get-ADUser -Identity jdoe -Properties LastLogonDate, Department |
Select-Object Name, Enabled, Department, LastLogonDate
Find everyone in a department:
Get-ADUser -Filter "Department -eq 'Finance'" -Properties Department |
Select-Object Name, SamAccountName
Create a new user in an OU, with a password they must change at first sign-in:
$password = Read-Host "Initial password" -AsSecureString
New-ADUser -Name "Jane Doe" -GivenName "Jane" -Surname "Doe" `
-SamAccountName "jdoe" -UserPrincipalName "[email protected]" `
-Path "OU=Staff,DC=ad,DC=example,DC=com" `
-AccountPassword $password -ChangePasswordAtLogon $true -Enabled $true
Add the user to a group:
Add-ADGroupMember -Identity "Finance Staff" -Members jdoe
Find and unlock locked-out accounts:
Search-ADAccount -LockedOut -UsersOnly | Select-Object Name, SamAccountName
Unlock-ADAccount -Identity jdoe
List enabled user accounts nobody has used in 90 days, then disable them after review:
Search-ADAccount -AccountInactive -TimeSpan 90.00:00:00 -UsersOnly |
Where-Object Enabled |
Select-Object Name, SamAccountName, LastLogonDate
# After reviewing the list:
# Search-ADAccount -AccountInactive -TimeSpan 90.00:00:00 -UsersOnly |
# Where-Object Enabled | Disable-ADAccount
See who has full control of the domain:
Get-ADGroupMember -Identity "Domain Admins" -Recursive | Select-Object Name, SamAccountName
List your domain controllers:
Get-ADDomainController -Filter * | Select-Object HostName, Site, IsGlobalCatalog
If PowerShell is new to you, start with PowerShell: A Beginner’s Guide for IT Administrators.
Planning a Domain: Naming and Domain Controllers
A few decisions are hard to change later:
- Domain name. Use a subdomain of a domain you own, such as
ad.example.com. Avoid made-up endings like.local, which can clash with other network services, and avoid using exactly your public website domain, which complicates DNS. - At least two domain controllers. If the only DC fails, nobody can sign in. Two DCs replicate to each other, so either can answer requests.
- DNS on the domain controllers. AD-integrated DNS is the standard setup. Point domain-joined computers at the DCs for DNS, not at your router or a public resolver.
- FSMO roles. Five special roles (Schema Master, Domain Naming Master, RID Master, PDC Emulator, and Infrastructure Master) each live on one DC at a time. Run
netdom query fsmoto see where they are, and check them before retiring a DC.
Securing Active Directory
Active Directory holds the keys to the whole network, so attackers go after it first. Ransomware groups typically break into one computer, steal credentials, and work their way up to Domain Admin. These practices make that much harder:
- Keep Domain Admins tiny. Only a few people, and only for tasks that truly need it. Check the membership regularly with the PowerShell command above.
- Use separate admin accounts. Admins read email and browse the web with a normal account and use a separate privileged account only for admin work, ideally from a dedicated admin workstation.
- Randomize local admin passwords. Windows LAPS gives every computer a unique local Administrator password stored in AD, so one stolen password doesn’t open every machine.
- Add multi-factor authentication for remote access, VPN, and cloud sign-ins. See Two-Factor Authentication (2FA) Explained.
- Use long passwords for service accounts, or group Managed Service Accounts (gMSA), which Windows rotates automatically. Weak service account passwords are the target of an attack called Kerberoasting.
- Put sensitive accounts in the Protected Users group, which blocks weaker sign-in methods such as NTLM for those accounts.
- Patch domain controllers first and keep them dedicated: no web browsing, no extra software.
- Disable stale accounts. Former employees’ and students’ accounts are an easy way in.
- Back up AD and test restores, including at least one backup that attackers can’t reach.
- Watch the logs. Alert on changes to privileged groups, many failed sign-ins, and new GPOs.
These steps follow the “never trust, always verify” approach of Zero Trust security.
Active Directory in Schools
School districts are some of the biggest Active Directory users: thousands of student and staff accounts, shared lab computers, and a new set of accounts every school year. Typical setups use OUs by campus and grade, Group Policy to lock down lab and testing computers, and an identity management tool that creates and disables accounts automatically from the student information system. Many districts then connect AD to Entra ID or Google Workspace and to a rostering and single sign-on platform such as Clever.
Conclusion
Active Directory gives a Windows network one place to manage who people are, what they can access, and how their computers are configured. Learn the core pieces (domains, domain controllers, OUs, groups, and Group Policy), understand that DNS and Kerberos do the work behind every sign-in, and treat AD as your most sensitive system. Even if your organization is moving to the cloud, AD knowledge carries over directly to Entra ID and hybrid identity.
Frequently Asked Questions
Is Active Directory free?
AD DS is a role included with Windows Server, so there’s no separate product to buy. You do pay for Windows Server licenses and the Client Access Licenses (CALs) for the users or devices that connect to it.
Is Active Directory the same as LDAP?
No. LDAP is a protocol for reading and writing directory data. Active Directory is a directory service that supports LDAP, along with Kerberos, DNS, and Group Policy.
Can Mac and Linux computers join Active Directory?
Yes. macOS has a built-in directory connector, and Linux can join with tools such as realmd and SSSD. They get domain sign-in, but Group Policy doesn’t apply to them; you’d manage their settings with other tools.
Do I need Active Directory if I use Microsoft 365?
Not necessarily. Microsoft 365 uses Entra ID, and cloud-only organizations can manage Windows devices with Entra ID and Intune. You still need AD DS for older apps that rely on Kerberos or LDAP, on-premises file servers, and Group Policy.
What’s the difference between a workgroup and a domain?
In a workgroup, every computer manages its own accounts and settings. In a domain, a domain controller manages them centrally. Workgroups suit a handful of home or small-office computers; domains suit anything bigger.
Related Reading
Want to keep learning? These related guides pair well with this post:
