Entra IDHow-to

Active Directory forest recovery, part 2: step-by-step restore, cleanup and reconnection

Restore one DC per domain in isolation, clean it up (FSMO, metadata, RID pool, krbtgt, trusts, DNS, GC), reconnect, verify replication and bring dependent services back.

You've confirmed that a full forest recovery is the right call and picked the backup to restore. Now the order of operations matters more than anything else: one wrong step can let damaged data replicate back in. In this post I'll walk through the execution in sequence, from isolating the DCs to verifying replication and reconnecting Microsoft Entra Connect, Exchange and Configuration Manager. Preparation is covered in part 1: planning, backups and readiness.

How this guide is organized: Prerequisites → Step-by-step → Verify the recovery → Tips and gotchasFlow diagram of the article's sections in reading order: 1. Prerequisites. 2. Step-by-step (7 steps: Shut down and isolate every writable DC; Restore the first writable DC in the domain; Clean up the restored DC; Repeat for each remaining domain; Connect the restored DCs and verify; Add a global catalog, back up, redeploy; Reconnect production and clean up dependent services). 3. Verify the recovery. 4. Tips and gotchas. Toolbox: Event ID 4602, Event ID 16650, Event ID 16654, repadmin /replsummary, Start-ADSyncSyncCycle.1Prerequisites2Step-by-step3Verify the recovery4Tips and gotchas1Shut downand isolate…2Restore thefirst writa…3Clean upthe restor…4Repeat foreach rema…5Connectthe restor…6Add aglobal cat…7Reconnectproduction…TOOLBOXEvent ID 4602Event ID 16650Event ID 16654repadmin /replsummaryStart-ADSyncSyncCycleHow this guide is organized: Prerequisites → Step-by-step → Verify the recovery → Tips and gotchasFlow diagram of the article's sections in reading order: 1. Prerequisites. 2. Step-by-step (7 steps: Shut down and isolate every writable DC; Restore the first writable DC in the domain; Clean up the restored DC; Repeat for each remaining domain; Connect the restored DCs and verify; Add a global catalog, back up, redeploy; Reconnect production and clean up dependent services). 3. Verify the recovery. 4. Tips and gotchas. Toolbox: Event ID 4602, Event ID 16650, Event ID 16654, repadmin /replsummary, Start-ADSyncSyncCycle.1Prerequisites2Step-by-step1Shut down and isolate every writable DC2Restore the first writable DC in the domain3Clean up the restored DC4Repeat for each remaining domain5Connect the restored DCs and verify6Add a global catalog, back up, redeploy7Reconnect production and clean up dependentservices3Verify the recovery4Tips and gotchasTOOLBOXEvent ID 4602Event ID 16650Event ID 16654repadmin /replsummaryStart-ADSyncSyncCycle
At a glance: how this guide is organized · 7 steps · 5 key settings and tools

Prerequisites#

  • A chosen backup per domain (writable DC, younger than the tombstone lifetime, taken before the failure).
  • The DSRM password for each restore DC and Enterprise Admins, Schema Admins and Domain Admins credentials.
  • An isolated network, and a list of every writable DC so none is missed.
  • The forest map from your plan: FSMO holders, GCs, DNS servers, trusts and IP addresses.

Step 1: Shut down and isolate every writable DC#

Forest recovery in seven stepsStep 1: Shut down and isolate writable DCs. FSMO holders first; RODCs may keep running Step 2: Restore first DC in the forest root. Non-authoritative AD DS, authoritative SYSVOL Step 3: Clean up the restored DC. FSMO, metadata, DNS, RID pool, passwords, GC Step 4: Repeat per domain, parent before child. One restored writable DC per domain Step 5: Connect restored DCs and verify. repadmin /replsummary, dcdiag, SYSVOL shares Step 6: Add a GC, back up, redeploy DCs. Promote or clone the rest; rebuild RODCs Step 7: Reconnect production services. Entra Connect or Cloud Sync, Exchange, ConfigMgr1Shut down andisolate writable DCsFSMO holders first;RODCs may keeprunning2Restore first DC inthe forest rootNon-authoritative ADDS, authoritativeSYSVOL3Clean up therestored DCFSMO, metadata, DNS,RID pool, passwords, GC4Repeat per domain,parent before childOne restored writableDC per domain5Connect restoredDCs and verifyrepadmin /replsummary,dcdiag, SYSVOL shares6Add a GC, back up,redeploy DCsPromote or clone therest; rebuild RODCs7Reconnectproduction servicesEntra Connect or CloudSync, Exchange,ConfigMgrForest recovery in seven stepsStep 1: Shut down and isolate writable DCs. FSMO holders first; RODCs may keep running Step 2: Restore first DC in the forest root. Non-authoritative AD DS, authoritative SYSVOL Step 3: Clean up the restored DC. FSMO, metadata, DNS, RID pool, passwords, GC Step 4: Repeat per domain, parent before child. One restored writable DC per domain Step 5: Connect restored DCs and verify. repadmin /replsummary, dcdiag, SYSVOL shares Step 6: Add a GC, back up, redeploy DCs. Promote or clone the rest; rebuild RODCs Step 7: Reconnect production services. Entra Connect or Cloud Sync, Exchange, ConfigMgr1Shut down and isolate writable DCsFSMO holders first; RODCs may keep running2Restore first DC in the forest rootNon-authoritative AD DS, authoritative SYSVOL3Clean up the restored DCFSMO, metadata, DNS, RID pool, passwords, GC4Repeat per domain, parent before childOne restored writable DC per domain5Connect restored DCs and verifyrepadmin /replsummary, dcdiag, SYSVOL shares6Add a GC, back up, redeploy DCsPromote or clone the rest; rebuild RODCs7Reconnect production servicesEntra Connect or Cloud Sync, Exchange, ConfigMgr
Figure 1 · Process Forest recovery in seven steps. Restore and clean one writable DC per domain in isolation, forest root first, then verify, redeploy the other DCs and bring dependent services back.

Shut down all writable DCs, especially the FSMO role holders, before any restored DC comes online. Move virtual DCs to an isolated virtual network or remove their network adapters; unplug physical ones. RODCs can keep running for cached branch sign-ins and are rebuilt at the end.

Recover the forest root domain first, then the other domains, always parent before child.

Step 2: Restore the first writable DC in the domain#

The first DC in each domain gets a non-authoritative restore of AD DS combined with an authoritative restore of SYSVOL, so that every later DC takes its SYSVOL from this one. Start the DC in Directory Services Restore Mode (DSRM), for example by setting the boot flag from Windows, then run the restore:

Command Prompt
bcdedit /set safeboot dsrepair
shutdown /r /t 0

REM In DSRM, signed in with the DSRM password:
wbadmin get versions
wbadmin start systemstaterecovery -version:10/28/2026-21:00 -authsysvol

REM After the restore, boot normally again
bcdedit /deletevalue safeboot

If you did a bare-metal or full server recovery instead, mark SYSVOL authoritative afterwards: in Active Directory Users and Computers with Advanced Features on, open Domain Controllers › <DC> › DFSR-LocalSettings › Domain System Volume, set msDFSR-Options on SYSVOL Subscription to 1, then:

PowerShell
Restart-Service DFSR -PassThru
Get-WinEvent -LogName 'DFS Replication' | Where-Object Id -eq 4602

Event 4602 means SYSVOL was initialized authoritatively. If the restored DC held a FSMO role, stop it from waiting for replication partners that no longer exist:

Command Prompt
reg add "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Parameters" /v "Repl Perform Initial Synchronizations" /t REG_DWORD /d 0 /f

Check that the data is good (the damaged objects or schema change are absent). If not, restore a different backup.

Step 3: Clean up the restored DC#

Seize the operations master roles#

On the forest root DC seize all five roles; in child domains seize the three domain-wide roles.

Command Prompt
ntdsutil
roles
connections
connect to server rootdc01.contoso.com
quit
seize schema master
seize naming master
seize pdc
seize rid master
seize infrastructure master
quit
quit

netdom query fsmo

If the DC wasn't the RID master before, you're warned that it can't sync with a partner. Confirm and continue.

Remove every other DC from the metadata#

Delete each other DC of the domain from the Domain Controllers OU in Active Directory Users and Computers, ticking This Domain Controller is permanently offline. That performs metadata cleanup and removes the server and computer objects. The command-line alternative is ntdsutil › metadata cleanup › remove selected server <ServerName>. If this DC was the RID master before the failure, it won't act as RID master until the cleanup is done: System log event 16650 is followed by 16648 once it succeeds.

Fix DNS#

Make sure the DNS Server service runs. In the root domain, point the DC's preferred DNS server to its own IP; in child domains, point it to the root DC. Delete NS records of removed DCs in the domain and _msdcs zones, and speed up SRV record removal:

Command Prompt
nltest /dsderegdns:olddc02.contoso.com

Raise and invalidate the RID pool#

Raise rIDAvailablePool by 100,000 so that new accounts never reuse the SIDs of accounts created after the backup, then invalidate the local pool:

PowerShell
$ridMgr = "CN=RID Manager`$,CN=System,$((Get-ADDomain).DistinguishedName)"
$rid = Get-ADObject $ridMgr -Properties rIDAvailablePool
Set-ADObject $ridMgr -Replace @{rIDAvailablePool = $rid.rIDAvailablePool + 100000}

$Domain = New-Object System.DirectoryServices.DirectoryEntry
$RootDSE = New-Object System.DirectoryServices.DirectoryEntry("LDAP://RootDSE")
$RootDSE.UsePropertyCache = $false
$RootDSE.Put("invalidateRidPool", $Domain.objectSid.Value)
$RootDSE.SetInfo()

Look for event 16654 in the System log. The first attempt to create a user, group or computer afterwards fails once, then succeeds with a new pool.

Reset the DC's computer password twice#

PowerShell
Reset-ComputerMachinePassword
Reset-ComputerMachinePassword

The equivalent on the DC itself is netdom resetpwd /server:<this DC> /userd:<domain\admin> /passwordd:*, also run twice. Pre-failure DCs can no longer replicate with this one.

Reset krbtgt twice#

In Active Directory Users and Computers (View › Advanced Features), right-click krbtgt in Users and choose Reset Password. The value you type doesn't matter; Windows generates a strong one. Do it twice, because the account keeps two passwords in history. Microsoft's procedure page asks for a gap of at least the maximum ticket lifetime (10 hours by default) between resets; plan that wait into your timeline. Don't touch the krbtgt_<number> accounts of RODCs.

Reset trust passwords (security incidents)#

If the recovery follows an attack, reset each trust from the trusting side with the same password on both sides. The command resets it twice by itself:

Command Prompt
netdom trust contoso.com /domain:child.contoso.com /resetOneSide /passwordT:<TrustPwd> /userO:administrator /passwordO:*

In that case, also reset all administrative account passwords before adding DCs, and plan gMSA re-creation.

Remove the global catalog and set time#

In a multi-domain forest, clear Global Catalog in the restored DC's NTDS Settings properties to avoid lingering objects from mismatched backup dates. Single-domain forests can keep it. Configure the root PDC emulator to sync with a reliable time source.

Step 4: Repeat for each remaining domain#

Restore and clean up one DC per domain with the same sequence, parent domains before children. Domains can run in parallel once their parent is done.

Step 5: Connect the restored DCs and verify#

Join the restored DCs to one common network that is still isolated from production. Physical DCs may need new IP addresses, so fix DNS records by hand. Then check:

Command Prompt
repadmin /replsummary
repadmin /viewlist *
nltest /dclist:contoso.com
dcdiag /v
dcdiag /test:dns
net share

Good looks like: zero failures in /replsummary, only the restored DCs in /viewlist, dcdiag passing Replications, Advertising, SysVolCheck and the DNS test, and SYSVOL and NETLOGON listed in net share.

Step 6: Add a global catalog, back up, redeploy#

Make the forest root DC a global catalog and force replication with every restored DC. It's ready when Directory Service event 1119 appears. Take fresh backups of all restored DCs now.

Then rebuild the other DCs: reinstall or forcibly remove AD DS and promote them again (old backups of those DCs are unusable), or clone virtual DCs from the restored one. Point each new DC to the first root DC for DNS, rebuild all RODCs, restore the original FSMO, GC and DNS layout, and set Repl Perform Initial Synchronizations back to 1.

Step 7: Reconnect production and clean up dependent services#

  • Directory data: recreate objects created after the backup, re-create external and outgoing forest trusts, and delete DNS and WINS records of DCs you didn't recover.
  • Microsoft Entra Connect Sync: verify the AD connector against the restored DCs, run a full import and full synchronization (Start-ADSyncSyncCycle -PolicyType Initial), and preview pending deletes before exporting. Users created after the backup will show up as deletions in Microsoft Entra ID. A staging server makes this safe.
  • Microsoft Entra Cloud Sync: check that the provisioning agents are healthy, then restart the sync for each configuration.
  • Seamless SSO: the AZUREADSSOACC account may be back to an old password; roll over its key (see my Seamless SSO guide).
  • Exchange Server: follow the Exchange Server outage and switchover guide.
  • Configuration Manager: follow the Configuration Manager site recovery guide.

Verify the recovery#

  • repadmin /replsummary clean across all DCs, and dcdiag /e /q silent.
  • netdom query fsmo shows the intended role holders.
  • Users sign in, Group Policy applies, and new accounts get created without errors.
  • Entra Connect or Cloud Sync exports cleanly with no unexpected deletes.

Tips and gotchas#

  • Never do an authoritative SYSVOL restore on a second DC in the same domain: it causes SYSVOL conflicts.
  • Keep a timestamped log of every command; it speeds up support calls and your post-incident review.
  • Replication errors after reconnection? Check my replication error codes and SYSVOL event IDs quick references.

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

M365 Subject Matter Expert, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)