4 September 2013

AD Health Check

I have been using this from before my blogging days so cant remember who the original author was, but a big thanks to you anyway

AD Health Check
Dumps results in c:\adHealth.txt

####################################################################### 
@echo off
echo Active Directory Health Diagnostic, v1.1 echo ........................................
echo Running dcdiag /v.....
dcdiag /v >> c:\adHealth.txt
echo Running dcdiag /test:DNS /DNSALL (This test may take a few minutes).....
dcdiag /test:DNS /DNSALL /e /v >> c:\adHealth.txt echo Running dcdiag /test:DcPromo /e /v.....
dcdiag /test:DcPromo /e /v >> c:\adHealth.txt echo Running dcdiag /test:RegisterInDNS.....
dcdiag /test:RegisterInDNS >> c:\adHealth.txt echo Running netdiag.exe /v.....
netdiag.exe /v >> c:\adHealth.txt
echo Running netsh dhcp show server.....
netsh dhcp show server >> c:\adHealth.txt echo Running repadmin /showreps.....
repadmin /showreps >> c:\adHealth.txt
echo Running repadmin /replsum /errorsonly.....
repadmin /replsum /errorsonly >> c:\adHealth.txt echo ........................................
echo Diagnostic Completed Successfully...
echo view results in C:\adHealth.txt
pause
echo ........................................
echo ........................................
echo ........................................
echo General Health Ratio (FAILS/PASSES) echo This is only a general indication of AD Health, please review the results in C:\adHealth.txt!
echo ........................................
echo NUMBER OF FAILS
find /c /i "fail" c:\adHealth.txt
echo ........................................
echo NUMBER OF PASSES
find /c /i "pass" c:\adHealth.txt
pause

#################################################################################################

No comments:

Post a Comment