Fix SYSVOL that stopped replicating with DFS Replication: check each DC replicated folder state, resume after event 2213 (dirty shutdown), recover from event 4012 (content freshness) and run a non-authoritative or authoritative sync safely.
Home › Guides › DFSR SYSVOL events 2213 and 4012
Last updated 18 November 2026
ResumeReplication command that the event text gives you. Recovery is complete when event 2214 is logged.MaxOfflineTimeInDays (60 when it's on). Do a non-authoritative sync of that DC (msDFSR-Enabled=FALSE, then TRUE, with DFSRDIAG POLLAD), and wait for events 4614 and 4604.msDFSR-options=1) is the exception. Microsoft says the only situation for it is when all DCs have logged 4012 and are in state 5.Back up SYSVOL on each DC before you change anything. Microsoft warns that reinitializing replication "may cause data loss if done incorrectly", and that deleting the DFS Replication database "shouldn't be required and is discouraged".
Microsoft's missing-shares article lists these together: the SYSVOL and Netlogon shares aren't shared on a domain controller, the sysvol folder is empty, the DC was recently promoted, DFS Replication replicates the SYSVOL Share replicated folder, and an upstream DC's DFS Replication service is in an error state. Its cause statement: "Domain controllers without SYSVOL shared can't replicate inbound because of upstream (source) domain controllers being in an error state. Frequently (but not limited to), the upstream servers have stopped replication because of a dirty shutdown (event ID 2213)."
On clients this often shows up first as Group Policy failures such as event 1058 (see Group Policy events 1058 and 1030).
Microsoft's DFSR articles use wmic. WMIC is deprecated as of Windows 10, version 21H1 and the 21H1 semi-annual channel release of Windows Server, and Microsoft says it is "superseded by Windows PowerShell for WMI". Starting in August 2026 Windows 11, versions 24H2 and 25H2 no longer include it and it can't be added back as a Feature on Demand. WMI itself remains supported, so the same DFSR classes work from PowerShell. Below, each Microsoft wmic command is shown as published, followed by a PowerShell version that queries the same namespace (root\microsoftdfs), class and method with Get-CimInstance and Invoke-CimMethod.
From Microsoft's article, run on a machine with the AD DS tools:
For /f %i IN ('dsquery server -o rdn') do @echo %i && @(net view \\%i | find "SYSVOL") & echo
For /f %i IN ('dsquery server -o rdn') do @echo %i && @wmic /node:"%i" /namespace:\\root\microsoftdfs path dfsrreplicatedfolderinfo WHERE replicatedfoldername='SYSVOL share' get replicationgroupname,replicatedfoldername,state
PowerShell version (one DC; replace DC01):
Get-CimInstance -ComputerName DC01 -Namespace root\microsoftdfs -ClassName DfsrReplicatedFolderInfo -Filter "ReplicatedFolderName='SYSVOL share'" | Select-Object ReplicationGroupName,ReplicatedFolderName,State
| State | Meaning |
|---|---|
| 0 | Uninitialized |
| 1 | Initialized |
| 2 | Initial Sync |
| 3 | Auto Recovery |
| 4 | Normal |
| 5 | In Error |
Microsoft notes that, depending on its condition, a DC "may fail to report a state value and indicate no instance(s) available". Count how many DCs aren't sharing SYSVOL, how many logged recent errors and how many are in an error state: the recovery method depends on it.
wmic.exe /node:%computername% /namespace:\\root\microsoftdfs path DfsrMachineConfig get MaxOfflineTimeInDays
For /f %i IN ('dsquery server -o rdn') do @echo %i && @wmic /node:"%i" /namespace:\\root\microsoftdfs path DfsrMachineConfig get MaxOfflineTimeInDays
Get-CimInstance -ComputerName DC01 -Namespace root\microsoftdfs -ClassName DfsrMachineConfig | Select-Object MaxOfflineTimeInDays
60 means content freshness is enabled; 0 means disabled. It is enabled by default on Windows Server 2012 and later domain controllers. The class reference defines the value as "The maximum number of days a replicated folder can be disconnected from other partners before it is put into an error state."
The events Microsoft's articles use to drive the recovery:
| Event | What it means in Microsoft's articles |
|---|---|
| 2213 | Dirty shutdown detected; DFS Replication is paused until an administrator resumes it |
| 2214 | Logged at the completion of dirty shutdown recovery (after ResumeReplication) |
| 4012 | Replication of the folder stopped because it failed for longer than MaxOfflineTimeInDays (content freshness) |
| 4114 | SYSVOL is no longer being replicated (membership disabled) |
| 4614 | DFS Replication is waiting to do initial replication |
| 4604 | SYSVOL initialized after initial sync (non-authoritative) |
| 4602 | SYSVOL initialized as the primary member (authoritative) |
| 1006 / 1008 | DFSR is stopping / DFSR stopped (used to time a clean shutdown) |
Microsoft's own check for 4602 is Get-WinEvent -LogName 'DFS Replication' | Where-Object ID -EQ 4602 | Format-Table -AutoSize -Wrap. To see all of the events above at once:
Get-WinEvent -LogName 'DFS Replication' | Where-Object ID -In 2213,2214,4012,4114,4602,4604,4614 | Format-Table TimeCreated,Id,Message -AutoSize -Wrap
A newly promoted DC that logged 4614 but never 4604 hasn't finished initializing SYSVOL. Look up any other IDs in the Windows Event ID Lookup.
DFS Replication keeps one ESE database per volume that hosts a replicated folder. A dirty shutdown happens when the service can't commit all pending changes to that database before it stops. Since hotfix 2663685 on Windows Server 2008 R2, and by default on Windows Server 2012, the service no longer recovers automatically; it logs 2213 and waits for an administrator.
wmic /namespace:\\root\microsoftdfs path dfsrVolumeConfig where volumeGuid="E18D8280-2379-11E2-A5A0-806E6F6E6963" call ResumeReplicationA successful run ends with
Method execution successful. and ReturnValue = 0;. From PowerShell, Microsoft says to add single quotation marks around the where clause:
wmic /namespace:\\root\microsoftdfs path dfsrVolumeConfig where 'volumeGuid="F1CF316E-6A40-11E2-A826-00155D41C919"' call ResumeReplicationThe same call without wmic:
Get-CimInstance -Namespace root\microsoftdfs -ClassName DfsrVolumeConfig -Filter "VolumeGuid='E18D8280-2379-11E2-A5A0-806E6F6E6963'" | Invoke-CimMethod -MethodName ResumeReplication
If several DCs are paused, Microsoft says to "fan out from a healthy domain controller by selecting direct partners of it, then recovering further downstream domain controllers, and so on". If you also have to reinitialize a replicated folder after a dirty shutdown, disable the replicated folder, run the resume command, then enable the folder; disabling and enabling it before the resume command means initial sync doesn't happen.
Microsoft's best-practice table lists AutoRecovery as On for domain controllers. To have DFSR recover automatically from a dirty shutdown (Windows Server 2008 R2 with hotfix 2780453, or Windows Server 2012), set:
Key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\DFSR\Parameters Value: StopReplicationOnAutoRecovery Type: Dword Data: 0
ipconfig /all) belongs to a virtualization vendor.HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control, value WaitToKillServiceTimeout (String, milliseconds; Microsoft's example is 300000, five minutes) extends the time for all services. Measure the gap between events 1006 and 1008 over the next few restarts and set the lowest value that lets DFSR stop cleanly. The maximum is one hour; above that the Service Control Manager reverts to 30 seconds.Content freshness logs 4012 when "replication has stopped because replication on the folder has failed for longer than the MaxOfflineTimeInDays parameter". The DC can't simply be resumed; it has to be reinitialized from a healthy partner. If only some DCs are blocked, recover each of them non-authoritatively (the equivalent of FRS D2):
CN=SYSVOL Subscription,CN=Domain System Volume,CN=DFSR-LocalSettings,CN=<the server name>,OU=Domain Controllers,DC=<domain>and set
msDFSR-Enabled=FALSE.DFSRDIAG POLLAD. Event 4114 shows SYSVOL is no longer being replicated.msDFSR-Enabled=TRUE on the same object, force AD replication again and run DFSRDIAG POLLAD again.With several DCs, work outward from a healthy DC through its direct partners, as for 2213. Microsoft adds: "If only repairing one DC, make it non-authoritative and don't touch other servers." To plan the order, map each DC's address to its AD site subnet with the IPv4 Subnet Calculator or IPv6 Subnet Calculator.
Use this (the equivalent of FRS D4) when all DCs have logged 4012 and their state is 5, or when you must force every DC to one copy (Microsoft's example: all logon scripts were deleted and a manual copy was put back on the PDC emulator). Pick the DC with the most up-to-date SYSVOL, preferably the PDC emulator.
CN=SYSVOL Subscription object (same DN as above) set msDFSR-Enabled=FALSE and msDFSR-options=1.msDFSR-Enabled=FALSE.msDFSR-Enabled=TRUE on the authoritative DC, force and validate AD replication, then run DFSRDIAG POLLAD on it. Event 4602 means it has done the authoritative sync.msDFSR-Enabled=TRUE on their objects, and run DFSRDIAG POLLAD on each of them.Microsoft's warning: if you set the authoritative flag on one DC, you must non-authoritatively sync all the others, or you'll see conflicts from any DC you skipped. In a forest recovery, Microsoft also documents setting msDFSR-Options to 1 through Active Directory Users and Computers (Advanced Features, Attribute Editor on the SYSVOL Subscription object), or using wbadmin -authsysvol when restoring a system state backup to the same hardware and OS instance, then Restart-Service DFSR -PassThru and checking for 4602.
| Situation | Microsoft's recovery |
|---|---|
| A DC logged 2213 and content freshness isn't triggered | ResumeReplication on that DC (fan out from a healthy DC if several are paused) |
| Two DCs: the first in 2213, the second never finished initial sync after promotion | ResumeReplication on the first (event 4602), then dfsrdiag pollad on the second until 4614 and 4604 |
| Two DCs: the second is waiting for initial sync (4614 without 4604) and content freshness is on | Make the first DC authoritative; the second is already waiting, so it doesn't need to be set non-authoritative |
| One or more DCs logged 4012, others are healthy | Non-authoritative sync of each blocked DC |
| All DCs logged 4012 and are in state 5 | Authoritative sync of the most up-to-date DC, non-authoritative for the rest |
Afterwards, Microsoft recommends regular review of the DFS Replication logs, health reports and the state query from Step 1. More Get-WinEvent and Get-CimInstance patterns are in the PowerShell Cheat Sheet; filter long exported logs with the Regex Tester.
Look up DFS Replication, Group Policy and Netlogon events in the Windows Event ID Lookup, find more Get-CimInstance and Get-WinEvent patterns in the PowerShell Cheat Sheet, filter exported event logs with the Regex Tester and map DC addresses to site subnets with the IPv4 Subnet Calculator. Related guides: Group Policy events 1058 and 1030, AD replication error 8614 and Netlogon event 5719.
DFS Replication detected a dirty shutdown of its database (it couldn't commit all pending changes before the service stopped) and paused replication on that volume. Since hotfix 2663685 on Windows Server 2008 R2, and by default on Windows Server 2012, an administrator has to resume it with the ResumeReplication command given in the event text.
Back up the replicated folders first, then run the wmic command from the event text, which calls the ResumeReplication method of the DfsrVolumeConfig class for the volume GUID. Without wmic, Get-CimInstance on root\microsoftdfs DfsrVolumeConfig piped to Invoke-CimMethod -MethodName ResumeReplication calls the same method. Event 2214 marks the end of recovery.
Content freshness protection stopped replication because the folder failed to replicate for longer than MaxOfflineTimeInDays, which is 60 when the protection is on (the default on Windows Server 2012 and later DCs). Recover that DC with a non-authoritative sync.
Microsoft says the only situation is when all domain controllers have logged event 4012 and are in state 5, or when you need to force every DC to one copy. Use the DC with the most up-to-date SYSVOL, preferably the PDC emulator, and make every other DC non-authoritative.
No. Microsoft says deleting the DFS Replication database from the volume shouldn't be required and is discouraged, because DFS Replication then treats all local data on the server as non-authoritative. Let it recover as the 2213 event instructs.
Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.