-
Notifications
You must be signed in to change notification settings - Fork 20
Script Info: Test SYSVOLReplication
Monitor AD SYSVOL Object Replication
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.
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.
PowerShell ActiveDirectory Module
N/A
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
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.
Event Log
Email
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/
- Copy-Scripts
- Get-ADConfig
- Get-ADLastBackupDate
- Get-DCDiskSpace
- Restore-PSADHealthConfig
- Set-PSADHealthConfig
- Test-ADConfigMailer
- Test-ADObjectReplication
- Test-ADReplication
- Test-ADServices
- Test-DCsOnline
- Test-ExternalDNSServers
- Test-ExternalTimeSync
- Test-InternalTimeSync
- Test-SRVRecords
- Test-SYSVOLReplication