Recreate DFS Database

I use DFS alot for work, sometimes it just gets grumpy and needs to be kicked in the guts.

Deleting the database isnt easy, becuase widnows keeps a pretty tight grib on anything in SystemVolumeInformation.

Use this script to move the DFS folder and have the service create a fresh new database

Hint – Look for DFS Database events in the application log, not the DFS replication log


REM Removes the broken DFSR configuration database from the system
net stop dfsr
icacls "%DFSR_DB_DRIVE%\System Volume Information" /grant "Domain Admins":F
cd "%DFSR_DB_DRIVE%\System Volume Information"
cd ..
icacls "%DFSR_DB_DRIVE%\System Volume Information" /remove:g "Domain Admins"
net start dfsr
dfsrdiag PollAD /Member:%userdomain%\%computername%




Original Article –