Active Directory Health Check

Update: Version 2

As Technet Gallery is retiring so moving the code to Git Hub. (click below github download link for this script)

Active Directory Health Check

Updated with few more Tests: FSMOCheck & Advertising

Note:- will not work on Non-English Platforms.

Hi Readers,

Sharing a script that can be used for checking AD Health, This script is similar to one of my other health Check scripts that we use for exchange

This will check below:

Ping,Netlogon,NTDS,DNS,DCdiag Test(Replication,sysvol,Services)

Just download the zip file from above & run the batch file using Admin privileges.(run it from machine that is not DC)

Below is the report that will arrive in your mailbox.

Change Variables in .ps1 as needed:

$smtphost = “”

$from = “”

$to = “”

$timeout = “60”

Please rate the script if it worked for you 🙂

Pre-requisites/Assumptions: Supports tools are installed (as DCDiag is used), Access to ActiveDirectory (Assumption is AD admin will be using this script), Powershell.

If you face any issues with this script functioning, pls use comments.


Thanks for reading …

Tech Wizard

PowerShell Fast Track

5 thoughts on “Active Directory Health Check

  1. Pingback: Active Directory Health Check V2 | Tech Wizard

  2. I’m getting this error MSG while running power shell.

    xception calling “Send” with “1” argument(s): “Failure sending mail.”
    At C:\ADHealthCheckV2\ADHealthCheck\ADHealthCheck.ps1:350 char:1
    + $smtp.send($msg)
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : SmtpException

  3. Great tool! We’ve been using it for years on dozens of AD forests we manage. We recently introduced Server 2022 DC’s to a couple forests and started getting Yellow warnings on NetlogonService and DNSServiceStatus results. The pattern is running the script on a non-’22 server errors on results for the ’22 server, and running it on the ’22 server errors on the non-’22 servers but is fine for itself. Any idea what Microsoft changed in Server ’22 to introduce this behavior? Thanks!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s