While working on a DFS implementation recently I noticed that DFS Replication wasn’t working.
My first step was to generate a Diagnostic Report, which can be found in the Actions Pane of DFS Management, when a replication group is selected. The report very helpfully told me two things. First, my destination server was still awaiting initial replication. Second, DFS couldn’t access the WMI repository on the source server.
Specifically: Due to the following error, the DFS Replication reporting mechanism cannot access the WMI (Windows Management Instrumentation) namespace to retrieve certain reporting information. Error ID: 0x80041002.
A quick Google told me that 0x80041002 translated to “WBEM_E_NOT_FOUND” which was less than helpful, but caused me to suspect that there were larger issues with the WMI repository. I ran the WMI Diagnosis Utility and my suspicions were confirmed: the WMI repository was corrupt.
I tried the recommended steps for repairing the repository to no avail, so I manually rebuilt the WMI repository:
- Change startup type to Window Management Instrumentation (WMI) Service to disabled
- Stop the WMI Service; you may need to stop IP Helper Service first or other dependent services before it allows you to stop WMI Service
- Rename the repository folder: C:WINDOWSsystem32wbemRepository to Repository.old
- Open a CMD Prompt with elevated privileges
- CD windowssystem32wbem
- for /f %%s in (‘dir /b /s *.dll’) do regsvr32 /s %%s
- Set the WMI Service type back to Automatic and start WMI Service
- cd /d c: ((go to the root of the c drive, this is important))
- for /f %%s in (‘dir /s /b *.mof *.mfl’) do mofcomp %%s
- Reboot the server
I then re-created my DFS Replication groups. Happily, ‘dfsrdiag replicationstate’ showed pending transactions, and it was only a matter of time before the initial sync was completed.
Shane Skriletz, PEI