dcdiag test of domain controller

The test

If all is well this powershell command should produce no output.

dcdiag | sls -pattern "failed|error" -Context 2

If you get "failed test DFSREvent"

This is what the error looks like:

>          There are warning or error events within the last 24 hours after the
           SYSVOL has been shared.  Failing SYSVOL replication problems may cause
           Group Policy problems.
>          ......................... PDCSRV failed test DFSREvent

Usually you get such errors because DC2 is not available (e.g. because it started after PDCSRV).

A) THE BEST OPTION is to run a DFS Replication Health Diagnostic

You start it like this:

Start d27cba41d7c3946ed9840bde6c68a4a2.png, select Replication ade4e4bbc9c14187dcce63181a674b82.pngclick c329768aac4a4a4b805791f3d43f971c.png and Next, Next, ...

If the health report looks like this (0 errors, all servers reporting) you are OK:

269e589f60171164cd73ed97e57960d9.png

B) ALTERNATIVELY IF YOU WANT to check the errors then use these 2 commands:

FIRST A PLAIN TEXT VIEW WITH THE ERRORS (only keeping the most important data for each event)

$Yesterday = (Get-Date) - (New-TimeSpan -Day 1)
Get-Eventlog -LogName 'DFS Replication' -After $Yesterday | ? {($_.EntryType -Match "Error")} | Select -Property Message,Source,TimeGenerated | fl
#\____________________________________/ \_______________/ \_______________________________/ \___________________________________________/ \____________
#get the event logs from DFS-R subsystem last 24hrs only keep only Errors keep only these properties of each event format as list

THEN A GUI VIEW (including warnings and all event data -- you can filter them out easily):
$Yesterday = (Get-Date) - (New-TimeSpan -Day 1)
Get-Eventlog -LogName 'DFS Replication' -After $Yesterday | where {($_.EntryType -Match "Error") -or ($_.EntryType -Match "Warning")} | ogv
Topic revision: r6 - 30 Nov 2023, NickDemou
Copyright © enLogic