Hi,
For this issue, we can simulate the problem by running the VB script (with the same user context as the monitors runs it) manually to check if the registry hive is accessible for further trouble-shooting. Below is just a sample for your reference:
Const HKEY_CURRENT_USER = &H80000001
const HKEY_LOCAL_MACHINE = &H80000002
Dim strComputer
strComputer = "."
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."
WScript.Echo strerror
End If
Alex
If the response is helpful, please click "Accept Answer" and upvote it.