The foundation of enterprise identity management in Windows environments.
Before diving into Active Directory, understand the two network models for Windows computers.
Active Directory Domain Services uses a hierarchical structure to organize objects.
| Component | Description | Boundary Type |
|---|---|---|
| Forest | Top-level container; shares common schema and global catalog | Security boundary |
| Domain | Logical grouping with own database; replication boundary | Administrative boundary |
| OU | Container within domain for organizing objects | Group Policy boundary |
A Domain Controller (DC) is a server running AD DS that authenticates users and stores the AD database.
Five special operations roles distributed among DCs:
OUs are containers that help organize objects within a domain. They're the primary targets for Group Policy.
User accounts are the primary identity objects in AD DS, representing people or services that need authentication.
| Type | Purpose | Example |
|---|---|---|
| Domain User | Standard employee accounts | jsmith@hexworth.local |
| Service Account | Run applications/services | svc_sqlserver |
| Managed Service Account | Auto-managed passwords for services | MSA_WebApp$ |
| Admin Account | Elevated privileges for IT staff | admin_jsmith |
Groups simplify permission management by allowing you to assign access to multiple users at once.
| Scope | Members Can Be | Can Access Resources In |
|---|---|---|
| Domain Local | Any domain in forest + trusted forests | Same domain only |
| Global | Same domain only | Any domain in forest |
| Universal | Any domain in forest | Any domain in forest |
Group Policy Objects (GPOs) allow centralized management of user and computer settings across the domain.
LSDOU (Local → Site → Domain → OU)
Installing Active Directory Domain Services is a two-step process: install the role, then promote to DC.
First, install the AD DS server role and its management tools using PowerShell.
To create the very first domain controller, you install a new AD forest. This establishes the root domain.
To add a second DC for redundancy, promote an additional server into the existing domain.
Several tools are available for managing Active Directory objects and settings.
| Tool | Purpose | Best For |
|---|---|---|
| Active Directory Users and Computers (ADUC) | Manage users, groups, computers, OUs | Daily administration tasks |
| Active Directory Administrative Center (ADAC) | Modern GUI with PowerShell history | Learning PowerShell, complex tasks |
| Group Policy Management Console (GPMC) | Create, edit, link GPOs | Policy management |
| Active Directory Sites and Services | Configure replication topology | Multi-site environments |
| PowerShell (ActiveDirectory module) | Scripting and automation | Bulk operations, automation |
The ActiveDirectory module provides cmdlets for managing all AD objects. Import it first with Import-Module ActiveDirectory.
Retrieve all properties for a user account to inspect their attributes.
Create a new domain user in a specific OU with an initial password and enable the account immediately.
Reset a password when a user is locked out or has forgotten their credentials.
List the current members of a security group to audit who has access.
Grant a user membership in a group so they inherit its permissions.
Create a new Global security group for project-based access control.
Efficiently searching AD is critical for administration. Use filters to find exactly what you need.
Search for all user objects within a specific Organizational Unit.
Locate disabled accounts that may need cleanup or re-enabling.
Identify stale accounts by checking last logon dates against a threshold.
Use wildcard patterns to find computers matching a naming convention.
Recursively enumerate group membership to see every user, including those in nested groups.
-Filter at the server instead of Where-Object client-side. Server-side filtering is much faster for large directories.
These are everyday tasks you'll perform as an AD administrator.
Unlock a user who has been locked out after too many failed password attempts.
Transfer a user from one OU to another when their role changes within the organization.
Import multiple users at once from a CSV file to avoid creating accounts one by one.
Use pipeline chaining to query a set of users and add them all to a group in one step.
-WhatIf parameter to preview changes before executing.