Active Directory Health Check V2

This is one of my work that is being used by thousands of customers, it was downloaded more than 30000 times before Microsoft TechNet gallery was retired. (AD Health Check V1)

I can still see a lot of interest in this script so parameterizing/small updates and placing it in Powershell Gallery for ease of download.

Download the script from Powershell gallery by using below command:

Install-Script -Name ADHealthCheckV2

You can also get this from Github using below link:

AD Health Check V2

Change to the location where you have placed the script, you can either enter the information such as smtp server on prompt or follow syntax described below in this post.

If you just press enter without adding any information, it will just generate the report in the same folder.



Use this syntax and save it in batch file so you do not have to enter information in the prompt again and again.

Single recipient Syntax:

.\ADHealthCheckV2.ps1 -Smtphost smtpserver -from donotreply@labtest.com -EmailReport vikas1@labtest.com

Multiple recipient Syntax:

.\ADHealthCheckV2.ps1 -Smtphost smtpserver -from donotreply@labtest.com -EmailReport “vikas1@labtest.com,vikas2@labtest.com”

Batch file syntax:

Powershell .\ADHealthCheckV2.ps1 -Smtphost smtpserver -from donotreply@labtest.com -EmailReport vikas1@labtest.com


Timeout value is by default set at 60, you can increase it if you want. (This is how long it will wait for DC to report for the test)

.\ADHealthCheckV2.ps1 -Smtphost smtpserver -from donotreply@labtest.com -EmailReport vikas1@labtest.com -timeout 120


You will receive the report on email as below:


Enjoy the new updated version and deploy to your environment.

 

Thanks for reading and downloading….

Tech Wizard

https://techwizard.cloud

https://syscloudpro.com/

PowerShell Cheat Book

2 thoughts on “Active Directory Health Check V2

  1. Hello and thanks for your script.
    It doesn’t works with my French Windows Server 2016 Active Directory :
    PS C:\Script\ADHealthCheck> $sysvol = start-job -scriptblock {dcdiag /test:Replications}
    PS C:\Script\ADHealthCheck> $sysvol.state
    Completed

    State show Completed and not Running

Leave a Reply

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

WordPress.com Logo

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

Google photo

You are commenting using your Google 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