Skip to content

Script Info: Test ADObjectReplication

Mike Kanakos edited this page Apr 19, 2019 · 1 revision

SYNOPSIS

Monitor AD Object Replication

DESCRIPTION

Each run of the script creates a unique test object in the domain, and tracks it's replication to all other DCs in the domain.

Script Type:

This script runs from a source server, determines the DC with the PDCE role, targets it, and creates a disabled computer object in the 'default computer' OU or CN.

By default it will query the DCs for about 60 minutes.

If after 60 loops the object hasn't repliated the test will terminate and create an alert.

The test object created in the run will be deleted at the end of the test cycle.

The script will look for other objects matching the same name format in the OU/CN, in case they were not deleted during the previous run, and alert if they exist.

If the PDCE is offline, the test will terminate.

If other DCs are offline, an alert will fire that they can't be reached. This only alerts on the 10th cycle of the test to prevent filling up your inbox.

The 17015 Job Output Event will include the duration metrics for the run.

Connection type:

PowerShell ActiveDirectory Module

Automatic repair option:

N/A

EventID Definitions:

17010 - Failure
17011 - Cycle Count
17012 - Test Object not yet on DC
17013 - Test Object on DC
17014 - Tests didn't complete in alloted time span
17015 - Job output
17016 - Test Object Created
17017 - Test Object Deleted
17018 - 1 minute Sleep
17019 - Posible old object detected

Alert Cleared Notice

The script will query the local Event log for failure event codes in the past 2 hours. If there was a previous failure, but the test succeeds on the current run, an alert will be sent that the previously seen errors have been cleared.

Currently Configured Output Options:

Event Log
Email

NOTES

Authors: Greg Onstot
Clone this wiki locally