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
Add to favorites
Active Directory
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question

  • 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
      Select-Object : Null parameter. Expecting one of the following types: {System.String, System.Management.Automation.Scri
      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.
    • 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.