DNS Health Report

This script runs DCDiag and variables to generate an HTML report on the health of DNS. The data table will be displayed with the health of your DNS servers.Must be an Administrator to run this.I am not the original creator of this PS script I modified it to help generate daily re

 
 
 
 
 
4.7 Star
(3)
Add to favorites
Active Directory
3/19/2019
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • HMTL Tags missing
    2 Posts | Last post March 19, 2019
    • Hi just to mention , when I run the script, there is an error in the html file generated:
      in the HEAD tags, there is a tag missing 
      <TITLE>You Business Name Here Administrator Report</TITLE> 
       
      TABLE {border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;} 
      TH {border-width: 1px;padding: 3px;border-style: solid;border-color: black;background-color: #FEF7D6;} 
      TD {border-width: 1px;padding: 3px;border-style: solid;border-color: black;background-color: #D9E3EA;} 
       
      </HEAD> 
      
      
      it should be:
      
      <TITLE>You Business Name Here Administrator Report</TITLE> 
      <style>  
      TABLE {border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;} 
      TH {border-width: 1px;padding: 3px;border-style: solid;border-color: black;background-color: #FEF7D6;} 
      TD {border-width: 1px;padding: 3px;border-style: solid;border-color: black;background-color: #D9E3EA;} 
      </style> 
      </HEAD> 
    • This is a problem with the formatting in TechNet. When I edit the code the style tag shows up fine. When I attempt to edit the tag regardless of browser TechNet has problems saving or changes the tag. I'll update and move the project to GitHub. Thanks!
  • Good Evening Brad
    2 Posts | Last post April 12, 2016
    • Good evening Brad, Thanks for your post,
      
      I Have a little problem with the execution of the script. The problem is when the dcdiag finishes running, later the script try to generate the html report but it sends me the next error:
      
      Add-Member : Cannot bind argument to parameter 'Name' because it is null.
      At C:\Users\csventana2\Desktop\ScriptDNS_Health.ps1:25 char:70
      +     {   Add-Member -InputObject $Tests -MemberType NoteProperty -Name <<<<  $Test.Name -Value $Test.Status
          + CategoryInfo          : InvalidData: (:) [Add-Member], ParameterBindingValidationException
          + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.AddMemberCo
         mmand
      
      Select-Object : Null parameter. Expecting one of the following types: {System.String, System.Management.Automation.Scri
      ptBlock}.
      At C:\Users\csventana2\Desktop\ScriptDNS_Health.ps1:60 char:25
      + $HTML = $Result | Select <<<<  $Fields | ConvertTo-Html -Head $htmlhead  -PreContent $htmlbody
          + CategoryInfo          : InvalidArgument: (:) [Select-Object], NotSupportedException
          + FullyQualifiedErrorId : DictionaryKeyUnknownType,Microsoft.PowerShell.Commands.SelectObjectCommand
      
      
      the .xml file size is 176 Kbyets
      
      and the .HTML size is 1 Kbyte
      
      Do you know, why is this error?
      
      I would appreciate your help.
      
      Greetings.
      
    • First a couple of checks:
      This is run on a domain controller and not from a workstation with AD tools installed.
      Must have admin privileges to run this script against AD.
      Must have C:\temp created and available to write to, so it can create the XML file to parse to create the HTML file.
      Since it is only running DC diag as long as those parameters above are followed it should work fine.