PEERDIST_ERROR_ALREADY_COMPLETED (0X00000FDC) Fix
This error means BranchCache already finished the job you're asking it to do again. Usually happens when a peer caching operation gets double-fired or the service state gets confused.
You're cruising along with BranchCache and suddenly see error 0X00000FDC — PEERDIST_ERROR_ALREADY_COMPLETED. This usually pops up when you're trying to publish content to the peer distribution system (like via PeerDistPublish or through Distributed File System Replication) and the system tells you it's already done. Happens a lot in WSUS or SCCM environments where a content publication job gets triggered twice. Or when a scheduled task or script runs the same publish command against a file that was already published.
Why this happens
BranchCache keeps a state table of published content hashes. When you tell it to publish a file, it checks that table. If the hash already exists and is marked as published, it returns this error instead of re-publishing. The root cause is almost always one of these:
- A script or scheduled task fires the same publish command twice
- The peer distribution service (PeerDistSvc) gets its cache corrupted or stuck in a half-state
- You're using an older version of the API (Windows 7/2008 R2 era) that doesn't handle idempotent calls well
- Someone manually deleted cache files while the service was running
How to fix it
Check if the content is actually already published. Run this PowerShell command to list published content:
Get-PeerDistPublish | Format-Table -AutoSizeIf the file or hash you're trying to publish shows up here, the error is telling the truth. Stop trying to publish it again.
If you need to force a re-publish (e.g., content changed but the hash didn't), clear the existing publication first:
Remove-PeerDistPublish -ContentPath "C:\path\to\file" -ForceRestart the PeerDistSvc service. This clears transient state issues:
net stop PeerDistSvc && net start PeerDistSvcIf the service doesn't start cleanly, check the event logs under
Applications and Services Logs > Microsoft > Windows > PeerDist. Look for event IDs 100, 200, or 300 that point to corruption.Clear the entire BranchCache cache if you suspect corruption:
netsh branchcache flushThis nukes all cached content. Clients will re-cache from scratch. Do this during maintenance windows.
Rebuild the peer distribution database. Stop the service, delete the database file, restart:
net stop PeerDistSvc del "C:\Windows\ServiceProfiles\NetworkService\AppData\Local\PeerDist\PeerDist.db" net start PeerDistSvcThe service recreates the database on next start. This is nuclear — only do it if steps 1-5 don't work.
What to check if it still fails
If you've done all that and the error comes back, check your code or script. The API call PeerDistPublish isn't idempotent in older Windows versions — calling it twice in a row will always return this error. Wrap your publish calls with a check:
if (-not (Get-PeerDistPublish | Where-Object { $_.ContentPath -eq "C:\path\to\file" })) {
PeerDistPublish -ContentPath "C:\path\to\file"
}
Also verify you're not running multiple instances of the same script in parallel. Task Scheduler and runaway background jobs are common culprits. Add a mutex or lock file to prevent double execution.
One last thing — if you're using this in a DFS Replication scenario, check the DFSR debug logs. Sometimes the staging area gets confused and triggers a re-publish on a file that hasn't actually changed. Clearing the DFSR staging area can fix it:
dfsrdiag.exe Backlog /RGName:"Your RG" /RFName:"Your RF" /Mem:ServerName
# If huge backlog, let DFSR catch up before retrying
That error is usually benign — it's just telling you work was already done. But if it's filling up logs or breaking automation, the steps above will kill it dead.
Was this solution helpful?