Skip to content

Script Info: Test SYSVOLReplication

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

SYNOPSIS

Monitor AD SYSVOL Object Replication

DESCRIPTION

Each run of the script creates a unique test object in SYSVOL on the PDCE, and tracks its 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 text file in \SYSVOL<DomainName>\Scripts.

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.

If the PDCE is offline, the test will terminate.

BUG? - For some reason, attempts to create the text files sporatically fails in some environments. If that happens the script waits for a few seconds and attempts to create a different file. If writing the second file also fails, the run will abort.

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

Connection type:

PowerShell ActiveDirectory Module

Automatic repair option:

N/A

EventID Definitions:

17000 - Failure
17001 - Cycle Count
17002 - Test Object not yet on DC
17003 - Test Object on DC
17004 - Tests didn't complete in alloted time span
17005 - Job output
17006 - Test Object Created
17007 - Test Object Deleted
17008 - 1 minute Sleep
17009 - Alert Email Sent

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

The concept is based on a script originally published by Jorge de Almeida Pinto.

The original can be found here: https://jorgequestforknowledge.wordpress.com/2014/02/17/testing-sysvol-replication-latencyconvergence-through-powershell-update-3/

Clone this wiki locally