Perform a Active Directory Health Check
and Dump results into HTML

This script performs a Active Directory health check.
It is useful to check whether Active Directory is up & running.

HTML document includes easy readable results.
TXT document includes full log.

Parameter OutputFile
Set the name of the HTML document.

Parameter LogFilename
Set the name of the TXT document.

Parameter ConfigurationFile
Set the name of the XML file containing your AD configuration.
It is useful to check wether the configuration has changed.

Parameter Scope
Define the scope of the health check.
All DC will be contacted if "Full" is set.
Only the current DC is used if "Limited" is set.

Example 1
.\ADHealthCheck.ps1 -LogFilename 'ADhealthcheck.txt' -OutputFile 'ADhealthcheck.html' -ConfigurationFile 'AD_configuration.xml' -Scope 'Full'
Performs a full Active Directory health check

Example 2
.\ADHealthCheck.ps1 -LogFilename 'ADhealthcheck.txt' -OutputFile 'ADhealthcheck.html' -ConfigurationFile 'AD_configuration.xml' -Scope 'Limited'
Performs a limited Active Directory health check

Written By: Nicolas Nerson
The script is designed to be run on a server on which the AD DS tools have been installed
'gpotool.exe' is necessary. Please see
The Get-DFSROutbandInfo function is adapted from
The script requires DFSR for Sysvol Replication

Change Log
v1.00, 2013-09-06 - Initial Version
v1.01, 2013-09-10 - Create the variable '$script:numberOfPartitions'
v1.02, 2014-01-10 - Integrate an XSD schema file thanks to Karl Vernet
v1.03, 2014-01-14 - Check the Backlog Counters
v1.04, 2014-03-21 - Correct a bug with Split('<br>'). Correct minor bugs
v1.05, 2014-07-07 - Force array casting. Add % of RID used. Correct minor bugs
v1.06, 2014-07-10 - Correct HTML error
v1.07, 2014-07-11 - Modify the way gpotool results are handled. Remove the test using $numberOfPartitions. Better casting variables.
v1.08, 2014-07-14 - Better casting variables. Modify the way to add results from gpotool when there are many domains. Sort the GPO by domain
v1.09, 2014-10-14 - Get-DFSROutbandInfo simplification
v1.10, 2014-11-05 - Correction of the Bridgehead Servers output. Add the DCs OS Name
v1.11, 2014-11-21 - Add the Global Catalog info. Correction of Get-DFSROutbandInfo. Change the tests with 'Limited' choice.
v1.12, 2014-11-24 - Reorder the tests and use a new Test-TcpConnection function to speed up the script. Remove old code. Better casting variables. Modify Test-Ldap, Test-Ping and Test-Wmi to get rid of unnecessary messages.
v1.13, 2014-12-03 - Correction of minor bugs. Change the way the jobs for dcdiag are started. Failback to older Test-TcpConnection because of many false positive
v1.14, 2014-12-23 - Use Test-NetConnection and Test-Connection when available. Add ping response time to HTML

Last edited Dec 23, 2014 at 11:42 AM by nnerson, version 10