Active Directory Architecture and Management Questions
Designing, operating and recovering Active Directory Domain Services and the directory estate around it. Covers logical and physical structure (forests, trees, domains, OUs, trusts, schema extension, FSMO roles, Global Catalog, RODCs), sites and replication topology, domain controller placement, promotion, upgrade and functional levels, DC locator and AD-integrated DNS, domain join, Kerberos and NTLM authentication including SPNs and delegation, token size and SID history, LDAP binds and query tuning, Group Policy design, processing order, filtering, deployment and troubleshooting, user, group, computer and service account management including PowerShell account scripting and account lockout investigation, delegation of control and tiered administration, fine-grained password policy, backup, authoritative restore, forest recovery and USN rollback, AD hardening against Kerberoasting, DCSync and Golden Ticket attacks, forest migration, and hybrid identity with Microsoft Entra ID (Microsoft Entra Connect, Cloud Sync, password hash sync, pass-through authentication, federation, password writeback). Questions are asked from the directory administrator's and architect's seat. Platform-neutral identity protocols and lifecycle design, Windows file-server administration (shares, NTFS permissions, profiles), Linux directory integration, and generic DNS and DHCP service operations are covered elsewhere.
A health check shows replication between two domain controllers failing with 'access denied' and 'RPC server unavailable' errors. How do you find the cause?
Sample Answer
Direct answer
Treat the two messages as two different layers and work from the bottom up. "The RPC server is unavailable" (Win32 error 1722, 0x6ba) means the destination DC (domain controller) could not connect to the RPC (remote procedure call) service on the source DC: DNS, routing, a firewall, or the link. "Replication access was denied" (error 8453, 0x2105) means a connection was made but the caller lacked rights on the directory partition, usually because of a machine-account or permission problem. A related "Access is denied" (error 5) points at time skew, a broken secure channel or Kerberos transport problems. Scope the failure with repadmin, then check DNS, ports, time, machine account and permissions, in that order, and prove the fix by watching a replication cycle succeed.
Ordered checks
| # | Check | Command | What the result tells you |
|---|---|---|---|
| 1 | Scope | repadmin /replsummary then repadmin /showrepl <destination DC> /errorsonly | Which source-destination pairs and partitions fail, the status code, the time of the last success and the count of consecutive failures. One pair points at that pair; every pair points at DNS, time or the PDC emulator |
| 2 | DNS | dcdiag /test:dns /v, nltest /dsgetdc:corp.contoso.com /force, nslookup of the source DC name and of its <NTDS Settings GUID>._msdcs.<forest root> alias | A missing or wrong record is behind a large share of 1722 errors (Microsoft's 1722 article says DNS lookup failures cause a large number of them); the GUID appears as "DSA object GUID" in repadmin /showrepl |
| 3 | Reach the ports | ping -a <source IP>, portqry -n <source> -e 135 | Port 135 is the RPC endpoint mapper. It tells the client which random port the replication service listens on, so a firewall can pass 135 and still block the dynamic range |
| 4 | Time | w32tm /stripchart /computer:<source> /samples:5 /dataonly | A difference over the 5 minute default Kerberos tolerance breaks authentication. Fix with w32tm /resync /rediscover and check the time hierarchy |
| 5 | Machine account and secure channel | dcdiag /test:CheckSecurityError, dcdiag /test:MachineAccount, nltest /sc_verify:corp.contoso.com | Reports a DC account missing required flags or a broken secure channel. Test-ComputerSecureChannel is designed for member computers; for a DC rely on the dcdiag and nltest checks in this row |
| 6 | Permissions | dcdiag /test:NCSecDesc, dsacls DC=corp,DC=contoso,DC=com | Shows whether the required replication rights exist on the head of each partition |
| 7 | Other transport causes | Event log (LSASRV 40960 and 40961), SMB signing policy | UDP fragmentation of Kerberos, or SMB signing mismatched between DCs, can surface as 1722 |
| 8 | Verify | Replicate Now on the connection object, then repadmin /showrepl <destination DC> /errorsonly and repadmin /replsummary | No failures listed, and "Last success" time moves |
A first look needs only checks 1 to 3: the scope tells you whether one pair or every pair is affected, DNS lookup failures account for a large share of 1722 errors, and a port test confirms the path. Time, machine account, permissions and the transport causes come in as the error code and the scope point to them, and check 8 closes every case.
Terms used in the table
- Machine account: the computer's own account in AD; a DC has one too, with a name ending in
$. - Secure channel: the authenticated connection between a computer and a DC, protected by the computer account's password.
- Connection object: the AD record that tells a DC to pull changes from a particular source DC; Replicate Now acts on it.
- PDC emulator: the DC that acts as the domain's time authority and receives password changes first.
- User Account Control (UAC) split token: when an administrator signs in with UAC on, Windows creates a filtered token without the admin group memberships and a full token that only elevated programs use.
dsaclsandportqry:dsaclsshows or changes the permissions on an AD object;portqryis Microsoft's tool that tests whether a port answers.- Tool output:
dcdiagprints one block per test that ends inpassed test <name>orfailed test <name>.nltest /sc_verifyon a healthy secure channel prints lines like these (layout illustrative):
Trusted DC Name \\DC-CHI1.corp.contoso.com
Trusted DC Connection Status Status = 0 0x0 NERR_Success
Trust Verification Status = 0 0x0 NERR_Success
The command completed successfully
A status of 0 (NERR_Success) on both lines means the channel is healthy. For w32tm /stripchart, read the offset on each sample line: that is how far the source's clock is from yours, and it must stay well inside the 5 minute Kerberos tolerance.
Ports to confirm between the two DCs (modern Windows)
135/TCP endpoint mapper; dynamic RPC 49152-65535/TCP; 389 TCP and UDP (LDAP); 3268/TCP (global catalog); 88 (Kerberos); 445/TCP (SMB); 53 (DNS); 123/UDP (time). Older Windows used 1025-5000 for dynamic RPC.
The 8453 branch in detail
- Replication needs these rights on each partition: Manage Replication Topology, Replicating Directory Changes, Replication Synchronization, Replicating Directory Changes All and Replicating Directory Changes In Filtered Set, granted to the groups Windows sets by default (Enterprise Domain Controllers, Domain Controllers, and for read-only DCs the Enterprise Read-Only Domain Controllers group on the forest root domain).
- The
userAccountControlvalue of a writable DC's computer account must include SERVER_TRUST_ACCOUNT (0x2000, 8192) and TRUSTED_FOR_DELEGATION (0x80000, 524288). Their sum is 532480 (0x82000), the typical value; a read-only DC typically shows 83890176 (0x5001000). - How to read the number:
userAccountControlis one 32-bit number in which each flag owns a single bit, and0xmarks hexadecimal. 0x2000 is 8192 and 0x80000 is 524288, so 0x82000 is 524288 + 8192 = 532480, which is 1000 0010 0000 0000 0000 in binary. To test a flag, AND the value with its mask: 532480 AND 8192 = 8192 and 532480 AND 524288 = 524288, so both flags are set. A result of 0 means the flag is missing. - If scheduled replication works but "Replicate Now" or
repadmin /replicateis denied, the person lacks the right, or User Account Control's split token removed the group from the token. Run elevated and comparewhoami /allelevated and non-elevated. - Related error 5 causes: excessive time skew, UDP fragmentation of Kerberos, a missing "Access this computer from the network" right, broken secure channels, and the CrashOnAuditFail value set to 2.
Sweeping the forest for current failures
$dcs = Get-ADDomainController -Filter * | Select-Object -ExpandProperty HostName
foreach ($dc in $dcs) {
"---- $dc"
Get-ADReplicationFailure -Target $dc | Format-List *
}
Worked example
Two branch DCs report problems. DC-FRA1 shows, for its domain partition from DC-CHI1, the pattern below (field names as in repadmin output; values illustrative).
DC=corp,DC=contoso,DC=com
Chicago\DC-CHI1 via RPC
Last attempt @ <date> <time> failed, result 1722 (0x6ba):
The RPC server is unavailable.
Read the block from the top. The first line is the directory partition. Chicago\DC-CHI1 via RPC names the source DC (site\name) that DC-FRA1 pulls from and the transport used. The Last attempt ... failed, result 1722 line is the outcome of the most recent pull, and the number is the Win32 error, here "the RPC server is unavailable" (the block is abridged; a full /showrepl entry also prints the time of the last success and a count of consecutive failures). An old last success with a rising failure count means replication has been broken for a while; a last success time that keeps moving means it is healthy.
DNS tests pass, portqry -n DC-CHI1 -e 135 succeeds, but a firewall change the previous Friday closed 49152-65535 between Frankfurt and Chicago. The endpoint mapper answered, then the client was told a random port that was blocked. Reopening the range clears it.
DC-DAL1, rebuilt last week, shows 8453 on the configuration partition. Reading its computer account with Get-ADComputer -Identity DC-DAL1 -Properties userAccountControl returns 4096 in this illustrative case, for example because the server was joined to the domain under the old DC's name and its promotion never completed. 4096 is 0x1000, WORKSTATION_TRUST_ACCOUNT, the flag of an ordinary domain member computer (Microsoft's own Get-ADComputer example shows a member server at 4096). Test it against the two required masks: 4096 AND 8192 = 0 and 4096 AND 524288 = 0, so both domain controller flags are missing. A writable DC account typically reads 532480 (0x82000), which is SERVER_TRUST_ACCOUNT (0x2000) plus TRUSTED_FOR_DELEGATION (0x80000), in place of the member-computer bit. With the flags corrected this cause is removed, and replication can be retried and checked as in check 8.
Pitfalls
- Starting with permissions when the real error is 1722: a denied-access fix cannot help a connection that never opens.
- Testing only port 135 and concluding the firewall is fine.
- Forcing replication before the cause is fixed, which only repeats the failure and adds noise to the logs.
- Relying on
Test-ComputerSecureChannelon a DC instead of the dcdiag and nltest checks.
Plan an upgrade of your domain controllers from Windows Server 2012 R2 to 2022 with minimal downtime. What do you verify before raising functional levels, and what can break?
Sample Answer
Direct answer
Do not upgrade the domain controllers (DCs) in place. First find out which engine replicates SYSVOL (the shared folder holding Group Policy files and logon scripts) and, if the domain still uses FRS (File Replication Service), migrate it to DFSR (Distributed File System Replication) while only 2012 R2 DCs exist, because a Windows Server 2022 server should be expected to refuse promotion into a domain that still uses FRS (Microsoft documents the refusal for Windows Server version 1709 and says Windows Server 2016 is the last release that supports FRS). Then add new Windows Server 2022 DCs alongside the 2012 R2 ones, let them replicate, move the five FSMO roles (Flexible Single Master Operations, the single-holder roles) to them, demote the old DCs, and only then raise functional levels (a functional level is a domain-wide or forest-wide setting that decides which Windows Server versions may run as DCs and which AD features are switched on). Because users always have at least one DC to log on to, there is no downtime for authentication. There is no 2022 functional level: Windows Server 2019 and 2022 DCs use the Windows Server 2016 level. A newer level, Windows Server 2025, does exist, but only Windows Server 2025 DCs can run at it, so with 2022 DCs the ceiling is the 2016 level.
Facts the plan depends on
- Microsoft's recommended upgrade path is a clean install that is promoted and the old DC demoted, rather than an in-place upgrade.
- Microsoft documents that Windows Server version 1709 cannot be promoted into a domain that still replicates SYSVOL with FRS (the promotion fails with a message telling you to migrate the domain to DFSR with dfsrmig first), and says Windows Server 2016 is the last release that supports FRS. The pages I checked do not name Windows Server 2019 or 2022 explicitly, so the working assumption is that they refuse too. This is why the SYSVOL migration comes first in the sequence below.
- Functional levels determine which DC operating systems are allowed. Microsoft's compatibility matrix for the currently supported levels:
| DC operating system | Runs at 2025 level | Runs at 2016 level | Runs at 2012 R2 level |
|---|---|---|---|
| Windows Server 2025 | Yes | Yes | No |
| Windows Server 2022 | No | Yes | Yes |
| Windows Server 2019 | No | Yes | Yes |
| Windows Server 2016 | No | Yes | Yes |
| Windows Server 2012 R2 | No | No | Yes |
Read the 2022 and 2012 R2 rows for this plan: a 2022 DC supports the 2016 and 2012 R2 levels, and a 2012 R2 DC supports only the 2012 R2 level. So once you raise to 2016, a 2012 R2 DC cannot be added again unless you use one of the rollback exceptions below.
- Microsoft's matrix lists the 2012 R2 level as supported for Windows Server 2022, 2019 and 2016 DCs, so a domain and forest already at the 2012 R2 level satisfy the level requirement for the new DCs.
- Raising a functional level cannot normally be undone. The Microsoft functional-level reference I could read (an archived page covering levels up to 2012 R2) lists narrow exceptions that apply only through
Set-ADDomainModeandSet-ADForestModein PowerShell: for example a forest at the 2012 R2 level with the AD Recycle Bin off can be lowered to 2012, 2008 or 2008 R2, and a domain at 2012 R2 can be lowered only when the forest level is lower than the domain level. I could not confirm an equivalent exception table for the 2016 level on a current Microsoft page, so treat a rollback from 2016 back to 2012 R2 as unconfirmed and plan on the raise being permanent. - At the Windows Server 2016 functional level, SYSVOL must replicate with DFSR. Windows Server 2016 is the last release that supports FRS. (FRS is the older engine that copies SYSVOL between DCs and DFSR is its replacement.)
Before you start
| Check | Why | How |
|---|---|---|
| Schema, infrastructure, RID and other role holders reachable | adprep (the Active Directory preparation tool: /forestprep once per forest extends the schema for a newer version, /domainprep once per domain prepares that domain, /rodcprep readies the forest for read-only DCs). adprep /forestprep runs against the schema master, /domainprep against the infrastructure master, and every DC install needs the RID master | Get-ADDomain | FL InfrastructureMaster, RIDMaster, PDCEmulator and Get-ADForest | FL DomainNamingMaster, SchemaMaster |
| Permissions | First newer-version DC needs credentials in Enterprise Admins, Schema Admins and Domain Admins. A later DC only needs Domain Admins. adprep /rodcprep needs Enterprise Admins | Group membership |
| Healthy replication | Upgrading on top of replication errors compounds them | Get-ADReplicationFailure, dcdiag |
| SYSVOL engine | Decides whether the DFSR migration is needed, and any migration must finish before the first 2022 DC is added | dfsrmig /GetGlobalState on the PDC emulator (PDC emulator is the role holder that sets time and password authority) |
| What points at the old DCs | Static DNS client settings, LDAP bindings, appliances and DHCP scope options referencing the old IPs break when those DCs are demoted | Inventory before demotion |
| Application compatibility | Check vendor support for the new OS and for NTLM, LDAP signing and similar assumptions | Test lab |
Sequence
-
Migrate SYSVOL from FRS to DFSR if needed, before any 2022 DC exists. Check first with
dfsrmig /GetGlobalStateon the PDC emulator; if the domain already reports Eliminated, skip this step.dfsrmigis supported only at the 2008 domain functional level or above. Stable states are 0 Start, 1 Prepared, 2 Redirected, 3 Eliminated. Rundfsrmig /SetGlobalState 1, then rundfsrmig /GetMigrationStateuntil all DCs report consistent, then repeat for 2 and 3. Until Eliminated you can roll back a stage (for exampledfsrmig /SetGlobalState 1from Redirected returns to Prepared). Eliminated is irreversible and the move cannot be reverted to FRS afterwards, so set 3 only when you are committed to DFSR, ideally after the migration has run clean for an agreed period. Read the global state only on the PDC emulator, because replication delay makes other DCs unreliable. In plain terms: Prepared has DFSR start replicating a copy of SYSVOL while FRS still serves it, Redirected switches the SYSVOL share over to the DFSR copy, and Eliminated stops FRS for good.What
dfsrmig /GetMigrationStateprints, as in the example in Microsoft's dfsrmig reference. When every DC has reached the state you set (here Prepared), it reports:textAll Domain Controllers have migrated successfully to Global state (Prepared). Migration has reached a consistent state on all Domain Controllers. Succeeded.While some DCs lag it lists them with their local state (the names are Microsoft's example):
textThe following Domain Controllers are not in sync with Global state (Prepared): Domain Controller (Local Migration State) DC type ========= CONTOSO-DC2 (start) ReadOnly DC CONTOSO-DC3 (Preparing) Writable DC Migration has not yet reached a consistent state on all domain controllers State information might be stale due to AD latency.Move to the next state only after you see the first form. A state in parentheses that is not the target state (here start and Preparing) belongs to a DC that has not finished.
-
Prepare the schema. Promoting the first 2022 DC runs
adprepautomatically when you supply the credentials above, or runadprep /forestpreponce per forest and/domainpreponce per domain beforehand. Let the schema change replicate before continuing. -
Add new DCs.
Install-ADDSDomainControllerwith a site name; do not place the database, logs or SYSVOL on ReFS (Resilient File System, a Windows volume format that Microsoft's install guidance says not to use for them). -
Move the roles.
Move-ADDirectoryServerOperationMasterRole -Identity "NEWDC" -OperationMasterRole 0,1,2,3,4moves all five. Confirm with theGet-ADDomainandGet-ADForestqueries above. -
Demote the 2012 R2 DCs one at a time, using the supported demotion procedure. If any was removed forcibly, clean its metadata.
-
Verify, then raise the levels. Raise the domain functional level, then the forest level, to Windows Server 2016.
What to verify before raising functional levels
- Every DC in the domain or forest is on a Windows Server version that supports the target level. Remaining 2012 R2 DCs block it.
- SYSVOL is on DFSR everywhere. This is a stated requirement at the 2016 level.
- Replication is clean and the role holders are the new DCs.
- The rollback caveat above is understood: plan the raise as permanent. If being able to go back to 2012 R2 matters to you, do not make the raise until the new DCs have run clean for an agreed period.
- You know what the new level enables, and which of it matters here. For this upgrade only one item needs an action: confirm no service account has been placed into the Protected Users group (a built-in security group whose members are denied NTLM, DES or RC4 in Kerberos preauthentication, delegation, and ticket renewal beyond the initial four hours) by surprise; the DC-side protections for that group begin at the 2012 R2 level, so this check matters most if the domain is still below that level. The rest only applies if you choose to adopt it afterwards: authentication policies and silos (forest-wide objects that control which hosts an account may sign on from), privileged access management using Microsoft Identity Manager (Microsoft's identity-management product), and automatic rolling of the password-based secrets on accounts set to require a smart card. The 2012 R2 level introduced the Protected Users protections and the policies and silos, the 2016 level introduced the other two, and none of them changes anything for an account until you configure it.
What can break
| Risk | Cause | Mitigation |
|---|---|---|
| Promotion blocked | A DC at an older functional level than the new OS supports | Remove those DCs first, raise levels to the supported minimum |
| Promotion of the first 2022 DC refused, or SYSVOL not converting | FRS still in use | Complete the DFSR migration to Eliminated before adding 2022 DCs, check dfsrmig /GetMigrationState |
| Clients or devices fail after demotion | They were pointed at the old DC name or IP | Inventory and repoint before demotion |
| Role holder missing during adprep | Schema or infrastructure master offline | Verify connectivity first, seize (force the role onto another DC) only if the holder is truly gone |
| Cannot add a 2012 R2 DC later | Functional level raised to 2016 | Keep the old level until you are sure; treat the raise as permanent |
| Failed install on a ReFS volume | AD data placed on ReFS | Use NTFS for database, logs and SYSVOL |
Pitfalls
- Upgrading the OS in place on the PDC emulator holder.
- Raising the functional level the same day, before the new DCs have proven stable.
- Moving the role holders, then demoting without checking the clients' DNS settings.
- Adding the first 2022 DC while SYSVOL still replicates with FRS.
Three domain controllers have failed, including the ones holding the single-master roles, and they cannot be recovered. Walk through regaining control of the directory. When is seizing a role acceptable rather than transferring it, and what must you clean up afterwards?
Sample Answer
Direct answer
If at least one healthy writable domain controller (DC) for the domain survives, this is a role-seizure and cleanup job, not a forest recovery. Pick the surviving DC with the most recently replicated data, seize the lost operations master roles (FSMO, flexible single master operations) onto it, remove the three dead DCs from the directory with metadata cleanup, repair what depended on them (DNS, global catalog, time), and make sure the old holders can never rejoin as they were. If no writable DC survives in a domain, the answer changes to forest recovery from a backup of a writable DC.
Transfer or seize. Transfer is the graceful move: the old holder is alive, reachable, and hands the role over. Seize is forced: the old holder cannot be reached and is not coming back, so another DC takes the role without its cooperation. Seizing is acceptable only when the holder has failed or its operating system is gone and it is not coming back.
Ordered runbook
- Freeze and scope. List which DCs are alive and what they believe.
netdom query fsmoshows the five recorded holders;repadmin /replsummaryshows which remaining DCs replicate cleanly and how stale each is. Keep every remnant of the dead DCs off the production network. - Choose the new holder. Best candidate: same domain as the old holder, with the most recently replicated writable copy of the role's partition (each role lives in one directory partition: schema master in the schema partition, domain naming master in the configuration partition, the three domain roles in the domain partition). The two forest roles (schema master, domain naming master) should go to a DC in the forest root domain.
- Check the candidate. Run
dcdiag /test:dnsandrepadmin /showreplon it. A candidate that cannot reach any partner may have a stale copy.repadmin /replsummaryprints one row per DC with alargest delta(the longest time since a successful replication) andfails/total; pick the DC with the smallest delta and0failures. Illustrative:DC-CHI3 largest delta 03m:12s, 0 / 3,DC-FRA1 largest delta 3h:10m, 0 / 3. - Seize. Use the cmdlet (shown next) or the Ntdsutil sequence. Credentials: Enterprise Admins for the domain naming master, Schema Admins for the schema master, Domain Admins for the PDC emulator, RID master and infrastructure master. In a one-domain forest, one account in all three groups covers all five roles.
- Wait and verify. The schema master, domain naming master, RID master and infrastructure master do not act until the new holder's copy of the role's partition has completed a successful inbound replication since the directory service started; the PDC emulator is active as soon as the domain partition names it as owner. Confirm with
netdom query fsmo, then rundcdiag /test:ridmanager /vagainst the new RID master to check that it is reachable and that the RID pool is available. - Clean up metadata for each dead DC (next section), then DNS, global catalog and time.
- Prevent return. Wipe or force-demote any repaired old holder before it touches the network, as set out under the heading Never bring a seized holder back as it was.
Seizing with PowerShell
# Run with Enterprise Admins, Schema Admins and Domain Admins rights. DC-CHI3 is the surviving DC chosen as the new holder.
$newHolder = Get-ADDomainController -Identity 'DC-CHI3'
$roles = 'SchemaMaster', 'DomainNamingMaster', 'PDCEmulator', 'RIDMaster', 'InfrastructureMaster'
# Rehearsal: shows what would happen and changes nothing
Move-ADDirectoryServerOperationMasterRole -Identity $newHolder -OperationMasterRole $roles -Force -WhatIf
# Real run: attempts a graceful transfer first, then seizes whatever it cannot transfer
Move-ADDirectoryServerOperationMasterRole -Identity $newHolder -OperationMasterRole $roles -Force -Confirm
The Ntdsutil equivalent, typed on the new holder. Line by line: ntdsutil starts the tool; roles opens the FSMO maintenance menu; connections opens the server connections menu; connect to server DC-CHI3.corp.contoso.com binds to the DC that will receive the role; quit returns to the FSMO maintenance menu; then one of seize schema master, seize naming master, seize pdc, seize rid master, seize infrastructure master. Each seize command asks for confirmation and then lists the role holders. If the machine was not the RID master before and cannot reach a partner, Ntdsutil asks whether to continue without synchronising; answer yes, because no partner exists (the Microsoft forest recovery guide gives the same instruction). Type quit twice to leave.
RID cost. The RID master hands out relative IDs (RIDs) in blocks from the domain's global pool, which is stored in the rIDAvailablePool attribute of CN=RID Manager$,CN=System,DC=<domain>; a DC normally asks for 500 at a time. A new RID master working from a stale copy of that pool could hand out a block the old holder already issued, which is why the candidate must be the DC with the freshest replicated copy. Microsoft's forest recovery guide deals with the same hazard after a restore by adding 100,000 to rIDAvailablePool, and its RID issuance article lists frequent RID pool invalidation, restores and metadata cleanups among the ways domains waste RIDs. The global pool holds 1,073,741,823 RIDs by default (2^30 minus 1), so waste only matters if it repeats, which is one reason to seize the RID master only when the old one cannot come back.
Metadata cleanup for the three dead DCs
- In Active Directory Users and Computers, delete the DC's computer object from the Domain Controllers OU and tick that the DC is permanently offline. Metadata cleanup (removing the dead DC's records from the directory so nothing keeps replicating with it) runs automatically; if the DC was a global catalog or still held a role, the wizard asks and moves the role to a DC it names, which is why you seize deliberately first.
- Or use Ntdsutil from an elevated prompt (Enterprise Admins credentials if prompted):
ntdsutil,metadata cleanup,connections,connect to server <live replication partner of the dead DC>,quit, thenremove selected server <ServerName>for the dead DC. Confirm the dialog, then typequittwice at themetadata cleanup:andntdsutil:prompts. The server you connect to must be a replication partner of the DC being removed. - In Active Directory Sites and Services, confirm the dead server objects no longer contain an NTDS Settings object (the child object that registers a DC as a replication participant; while it exists, other DCs still expect that DC), then delete the empty server objects.
- "Access is denied" during cleanup usually means the computer object or NTDS Settings object is protected from accidental deletion; clear that and retry.
- Then fix what pointed at the dead DCs: stale DNS records, DNS server lists handed out by DHCP and set on servers, any manually created replication connection objects (one-way replication links between DCs; the replication topology builder, the Knowledge Consistency Checker, rebuilds only the automatically generated ones), and time sync.
- Make sure every site still has a global catalog server.
- Check time. Kerberos rejects tickets when clocks differ by more than 5 minutes by default, and every domain member ultimately follows the forest root PDC emulator. If the old PDC emulator was the forest root time source, set an external source on the new one (
/manualpeerlistnames the external time servers,0x8marks each as a client-mode peer,/syncfromflags:manualsays use that list,/reliable:YESmarks this DC as a trusted source for the domain, and/updateapplies the change):w32tm /config /manualpeerlist:"time1.example.com,0x8 time2.example.com,0x8 time3.example.com,0x8" /syncfromflags:manual /reliable:YES /update.
Never bring a seized holder back as it was
A duplicate holder of any role is a fault, and for the schema master, domain naming master and RID master the damage is the easiest to see: each can persist changes, so two of them can create conflicting schema objects, domains or RID pools, and a duplicated RID pool means duplicate security identifiers: a SID is the domain's SID plus a RID, each DC mints new accounts from a RID pool the RID master hands out, so two holders issuing the same range would give two different accounts the same SID and the same access. A returning schema master, domain naming master, RID master or infrastructure master normally waits for inbound replication and learns it has lost the role once it has replicated. The PDC emulator has no such wait: a returning PDC emulator whose copy still names itself acts as the PDC emulator at once, until replication tells it otherwise. That protection also fails in isolated segments. So the rule is absolute: if the hardware is repaired, wipe and reinstall it (or force-demote it), remove its metadata, then promote it as a new DC and transfer a role back if you want. Do not restore it from backup, because a restore rebuilds it as the role holder again: the restored directory still records that machine as the owner of the role, so it believes it holds it.
Worked example
corp.contoso.com is a single-domain forest. DC-CHI1 (PDC emulator, RID master, infrastructure master), DC-CHI2 (schema master, domain naming master) and DC-DAL1 are lost to a storage failure. DC-CHI3 and DC-FRA1 survive. repadmin /replsummary shows DC-CHI3 with the smaller replication delta (illustratively 3 minutes 12 seconds against 3 hours 10 minutes for DC-FRA1, both with 0 failures), so it becomes the holder. The administrator seizes all five roles with the script, waits for the first inbound cycle, verifies with netdom query fsmo, deletes the three computer objects with cleanup, marks Chicago's remaining DC as a global catalog, deletes stale DNS records and points DHCP at DC-CHI3 and DC-FRA1. Time is repointed to three external sources. The dead storage array is wiped before any server is re-promoted.
Pitfalls
- Seizing because a role holder is merely unreachable across a failed WAN link creates duplicate role holders. Confirm the old holder is really gone.
- Skipping the post-seize replication check and declaring victory while the new holder is still inactive.
- Leaving dead DCs in DNS and the topology, so clients and replication keep trying them.
- Having no tested backup of at least two writable DCs per domain, which turns the next disaster into a forest recovery.
How do group types and scopes work in a multi-domain forest, and how would you nest groups to grant access to a resource? What risk comes from converting a distribution group to a security group?
Sample Answer
Direct answer
A group has a type and a scope. (Terms used below: a SID, security identifier, is the unique value that identifies an account or group inside permission lists and access tokens; a trusting domain or forest is one that has agreed to let accounts from another domain or forest be granted access to its resources.) The type says what it is for: a security group can be listed in access control lists (DACLs, the permission lists on files, shares and objects), a distribution group can only be used for email. The scope says who can be a member and where the group can be granted access. In a multi-domain forest use AGDLP: Accounts go into Global groups (one per role, in the user's own domain), global groups are nested into Domain Local groups (one per resource and permission level, in the resource's domain), and permissions are granted to the domain local group. Converting a distribution group to a security group is risky because the list's membership, curated for email, suddenly becomes a source of access.
Scopes and membership rules
Why the scopes sit where they do: a global group only holds members from its own domain, so its membership changes replicate inside that domain and nowhere else. A universal group's membership is stored in the global catalog and replicates forest-wide, so it can hold members from anywhere but every change costs forest-wide replication. A domain local group is visible for permissions only in its own domain, which is why it belongs next to the resource.
| Scope | Members can be | Can be used for permissions | Can be converted |
|---|---|---|---|
| Global | Accounts and global groups from the same domain | Anywhere in the forest, and in trusting domains and forests | To universal, if it is not a member of another global group |
| Domain Local | Accounts, global groups and universal groups from any domain in the forest or a trusted domain; domain local groups from the same domain | Only in its own domain | To universal, if it contains no other domain local group |
| Universal | Accounts, global groups and universal groups from any domain in the forest | Anywhere in the forest or in trusting forests | To domain local, if it is not a member of another universal group; to global, if it contains no other universal group |
The conversion column follows from the nesting rules. A universal group cannot be a member of a global group, so a global group that is a member of another global group cannot become universal. Example: GG-Finance-EU sits inside GG-All-EU, so converting GG-Finance-EU to universal fails until it is removed from GG-All-EU. In the same way, a domain local group holding another domain local group cannot become universal, and a universal group holding other universal groups cannot become global.
Local groups on a member server or workstation are a fourth kind of group, stored on that computer. Per Microsoft's table, a domain local group can be a member of local groups on computers in the same domain (except built-in groups with well-known SIDs). Use local groups for per-machine rights, not for shared resources.
Nesting for a resource (worked example)
Forest: corp.contoso.com (parent) and eu.contoso.com (child domain). The share \EUFS01\Finance sits in the eu domain. Finance staff exist in both domains.
- Create global group GG-Finance-Corp in corp and GG-Finance-EU in eu. Each holds only its own domain's finance users.
- Create domain local group DL-EUFS01-Finance-Modify in eu and put both global groups in it (a domain local group accepts global groups from any domain).
- Grant Modify on the Finance share and NTFS folder to DL-EUFS01-Finance-Modify only.
- A new finance hire is added to the global group in their own domain. Nothing on the file server changes.
When one role is needed in many resource domains, nest the global groups into a universal group (UG-Finance-All) and nest that into the domain local groups. Keep the universal group's direct members few and stable, because a domain controller must be able to supply universal group membership at logon from a global catalog or a cached copy. Link-value replication (LVR) replicates only the one added or removed member value instead of the whole member list, which matters for groups with thousands of members. It needs a forest functional level of Windows Server 2003 or higher (the functional level is the setting that says which Windows Server versions the domains and forest must run, and it unlocks features accordingly).
Do not put users directly into the domain local group: that works until the second domain or the second permission level arrives, and then every ACL (access control list) needs re-editing. Permissions also come in two layers on a file share, share permissions and NTFS permissions on the folder; a common pattern is to open the share to the same group and let NTFS do the fine-grained control, since the more restrictive of the two wins.
Token size
Every group SID (security identifier) a user belongs to goes into that user's access token at logon. The flattened set means the token lists every group the user is in, including the ones reached only through nesting, so nesting does not reduce the count. There are two separate limits. The Windows access token holds at most about 1,010 group SIDs (Microsoft documents a 1,010 SID limit for the LSA access token). Kerberos tickets carry the same data in a size-limited field, and since Windows Server 2012 the default MaxTokenSize is 48,000 bytes. Microsoft's estimate of the ticket size is 1200 + 40d + 8s bytes, where d counts universal-group memberships from other domains plus SID history entries, and s counts memberships in global groups, domain local groups and universal groups from the user's own domain.
Worked check with illustrative numbers: a user in 600 global groups in their own domain has s = 600, so the ticket is about 1200 + 8 x 600 = 6,000 bytes, far under 48,000. Solving the formula for the limit, 48,000 allows (48,000 - 1,200) / 8 = 5,850 such groups, or (48,000 - 1,200) / 40 = 1,170 cross-domain universal memberships. For ordinary global-group memberships the 1,010 SID limit is reached first, at 1200 + 8 x 1,010 = 9,280 bytes, long before the byte limit. Symptoms of token bloat are logon failures or access denied for users in many groups. Rationalize group membership rather than only raising the limit.
Converting a distribution group to a security group
A distribution group is not security-enabled, so it cannot be in a DACL. Conversion makes it a security principal, and its SID goes into the token of every member from their next logon. The risks:
- The membership was maintained for mail, not for access: it can include stale members, broad nested lists and people who should never see a given resource. Anything that later grants this group access, or already references it, now applies to all of them.
- Token growth: every converted group adds a SID to each member's token.
- The conversion is silent. Nothing alerts the owner of the file share that a mailing list is now a permission source.
Safer path: audit and clean the membership first, or create a new security group with the intended members instead of converting, and review any place the group name already appears in permissions.
Pitfalls
- Putting accounts straight into ACLs instead of groups.
- Using universal groups everywhere. They make logon depend on global catalog access and increase what must be available forest-wide.
- Nesting too deeply: it hides who has access and makes audits slow.
Which operations roles exist in an AD forest, who holds them by default, and what stops working for users or admins if each holder goes offline? Where would you place them in a multi-site forest?
Sample Answer
Direct answer
There are five operations master roles, also called FSMO roles (flexible single master operations): two per forest (schema master, domain naming master) and three per domain (PDC emulator, RID master, infrastructure master). Active Directory is multimaster (any domain controller accepts changes and replicates them to the others), so any DC accepts most changes, but these five jobs are done by exactly one DC each to prevent conflicting updates. By default the first DC in a new forest holds all five, and the first DC in each additional domain holds that domain's three. Place them on well-connected, reliable DCs, keep PDC emulator and RID master the most protected, and name a standby for each.
The five roles, defaults and what breaks
| Role | Scope | What it does | If the holder is offline |
|---|---|---|---|
| Schema master | Forest | Only DC that accepts schema updates | Nothing for users; schema changes (for example an application install that extends the schema) fail |
| Domain naming master | Forest | Adds and removes domains and application directory partitions | Cannot add or remove domains or partitions, including enlisting a DNS server in a new application partition |
| RID master | Domain | Hands each DC a pool of relative IDs (RIDs, the unique tail of every security identifier or SID, the unique ID Windows uses for a user, group or computer in permissions) | Each DC keeps creating users, groups and computers until its current pool runs out; then creation on that DC fails |
| PDC emulator | Domain | Receives password changes preferentially, handles bad-password retries and account lockout, and is the time source for the domain | Users who just changed a password may be rejected on DCs that have not received it yet, because those DCs normally forward the failure to the PDC emulator; account lockout processing and the domain time hierarchy also depend on it |
| Infrastructure master | Domain | Updates names of security principals from other domains referenced in groups | Stale cross-domain group member names; no effect in a single-domain forest or when every DC is a global catalog or when the AD Recycle Bin is enabled |
Two behaviours matter in an outage. Four of the five role holders (schema master, domain naming master, RID master and infrastructure master) are active only after they have successfully received inbound replication (changes arriving from their replication partners) of the partition that stores the role (a section of the directory database that replicates as a unit: schema, configuration, one per domain, and application partitions such as DNS zones) since the directory service last started; the PDC emulator is the exception, because it is active as soon as the domain partition names it as owner, with no inbound replication requirement. Also, a read-only DC (RODC, a DC that holds a read-only copy and accepts no direct changes) can never hold a role.
Placement in a multi-site forest
Worked layout for one domain, corp.contoso.com, with three sites: Chicago (800 users, hub), Dallas (120 users), Frankfurt (60 users). Chicago has DC-CHI1, DC-CHI2 and DC-CHI3; Dallas and Frankfurt have one DC each.
| Role | Holder | Standby | Reason |
|---|---|---|---|
| PDC emulator | DC-CHI1 | DC-CHI2 | Site with the most users and best connectivity; password forwarding goes there |
| RID master | DC-CHI1 | DC-CHI2 | Must be consistently available; same DC as the PDC emulator keeps both in the best-protected place |
| Schema master | DC-CHI2 | DC-CHI1 | Forest role in the forest root domain, rarely used, on a reliable hub DC |
| Domain naming master | DC-CHI2 | DC-CHI1 | Same reasoning, forest root domain |
| Infrastructure master | DC-CHI3 | DC-CHI2 | Single-domain forest, so every DC can be a global catalog and its location is insignificant |
The standby should be a direct replication partner of the holder. Within a site the knowledge consistency checker (KCC, the process that builds replication topology) arranges DCs in a bidirectional ring (each DC linked to its neighbours in a loop, with changes able to flow either way so a failed link still leaves a path), so in a three-DC site each DC is a direct partner of the other two; confirm with repadmin /showrepl. Dallas and Frankfurt hold no roles: if the WAN drops, their users still sign in, and a password that fails locally is checked at the PDC emulator only when it is reachable.
In a multi-domain forest the infrastructure master must not sit on a global catalog server unless every DC in the domain is one; otherwise it never sees stale references and does nothing (Microsoft notes that a warning is logged on that DC). Traced with an example: domain corp.contoso.com has a group Shared-Reports whose member is eu.contoso.com\jsmith, a user in another domain. The group stores only a pointer to that user (a name and a SID). If jsmith is renamed or moved in eu, the pointer in corp still shows the old name. The infrastructure master in corp compares its pointers with a global catalog, which holds a current copy of the eu user, spots the difference and replicates the fix to the other DCs in corp. If the infrastructure master is itself a global catalog, it already holds that current copy, so it sees no difference, sends no fix and the old name stays. In a single-domain forest there are no other-domain pointers to go stale, and with the AD Recycle Bin enabled each DC maintains them itself.
Checking holders
$forest = Get-ADForest
$domain = Get-ADDomain
$holders = [ordered]@{
SchemaMaster = $forest.SchemaMaster
DomainNamingMaster = $forest.DomainNamingMaster
PDCEmulator = $domain.PDCEmulator
RIDMaster = $domain.RIDMaster
InfrastructureMaster = $domain.InfrastructureMaster
}
$holders.GetEnumerator() |
ForEach-Object { [pscustomobject]@{ Role = $_.Key; Holder = $_.Value } } |
Format-Table -AutoSize
$im = Get-ADDomainController -Identity $domain.InfrastructureMaster
if ($im.IsGlobalCatalog -and $forest.Domains.Count -gt 1) {
Write-Warning "Infrastructure master is on a global catalog server in a multi-domain forest. Fine only if every DC in the domain is a global catalog."
}
Read-out, line by line: Get-ADForest and Get-ADDomain return objects whose properties name the role holders; the [ordered] hashtable lists the five in a fixed order; GetEnumerator with ForEach-Object turns each entry into a Role and Holder row so Format-Table can print it; the last block fetches the infrastructure master's DC object and warns only when it is a global catalog in a forest with more than one domain. Illustrative output for the layout above (names invented):
Role Holder
---- ------
SchemaMaster DC-CHI2.corp.contoso.com
DomainNamingMaster DC-CHI2.corp.contoso.com
PDCEmulator DC-CHI1.corp.contoso.com
RIDMaster DC-CHI1.corp.contoso.com
InfrastructureMaster DC-CHI3.corp.contoso.com
The warning prints nothing here because the forest has one domain. netdom query fsmo from an elevated prompt prints the same five holders.
repadmin /showrepl lists each partition a DC replicates and, under INBOUND NEIGHBORS, each partner it receives from. Illustrative, abridged output run on DC-CHI1:
Chicago\DC-CHI1
DSA Options: IS_GC
==== INBOUND NEIGHBORS ======================================
DC=corp,DC=contoso,DC=com
Chicago\DC-CHI2 via RPC
Last attempt @ 2026-10-06 09:12:44 was successful.
Chicago\DC-CHI3 via RPC
Last attempt @ 2026-10-06 09:12:51 was successful.
Two partners both reporting a recent successful attempt confirm that DC-CHI2 and DC-CHI3 are direct replication partners of DC-CHI1, which is what a standby needs.
Trade-offs and pitfalls
- Leaving all five on the first DC is the default and a common mistake: that server becomes a single point of failure for every role at once, so spread the roles and name a standby for each.
- Gracefully demoting a role holder reassigns its roles; a forced removal can leave roles in an invalid state until an administrator seizes them (forcibly assigns them to another DC because the old holder is gone for good; the graceful alternative is a transfer while both DCs are up).
- Documenting holders and standbys matters more than the exact layout: during an outage nobody should have to discover who holds what.
Unlock Full Question Bank
Get access to all Active Directory Architecture and Management interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.