'Check the registry for Strict Replication Consistency. If not set throw an error.
On Error Resume Next
Dim oReg, strKeyPath, strValueName, dwValue
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "System\CurrentControlSet\Services\NTDS\Parameters"
strValueName = "Strict Replication Consistency"
oReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
WScript.Echo "Strict Replication Consistency: " & dwValue
Dim strError
If (Err.Number <> 0) Then
strError = "Failed to connect to registry hive HKLM." & vbcrlf
strError = strError & "Verify that the agent has access to view the registry."
oBag.AddValue "State", "BAD"
oBag.AddValue "ErrorString", strError
oAPI.AddItem oBag
ElseIf dwValue <> 1 Then
strError = "The strict replication consistency is not enabled." & vbCrLf
strError = strError & vbCrLf & "Technet article outlining how to enable Strict replication:" & vbCrLf
strError = strError & "https://technet.microsoft.com/en-us/library/cc816938(v=ws.10).aspx"
oBag.AddValue "State", "BAD"
oBag.AddValue "ErrorString", strError
oAPI.AddItem oBag
Else
oBag.AddValue "State", "GOOD"
oAPI.AddItem oBag
End If