• Microsoft DHCP Documentation Script V2.00

    October 26, 2020

    DHCP, PowerShell

    It started out as a quick email from a script user: the DHCP script doesn’t document all the settings for Server or Scope Policy settings. As I started working on that oversight, I started noticing other things wrong in the script. That led to something similar to pulling a thread and literally rewriting the script.

    There are three important things you should know about this script.

    1. It requires a minimum PowerShell version of 4
    2. The default output is now HTML, not Microsoft Word
    3. You can now select any combination of the four output report types: HTML, MSWord, PDF, and Text

    I want to thank Ivo Duarte who started this thread-pulling exercise. I also want to thank David McSpadden, Guy Leech, and Michael B. Smith for testing the script, recommending changes, and sending sample reports.

    Version 2.00 26-Oct-2020

    • Changed all Word/PDF tables to Ian Brighton’s table functions
    • Changed color variables $wdColorGray15 and $wdColorGray05 from [long] to [int]
    • Changed Network Access Protection Status values to a Switch table to get the full-text label
    • Changed several sections from outputting in WriteWordLine to Word/PDF tables
    • Changed sorting of DHCP Reservations from IPAddress to Name
    • Changed formatting of Statistics percentages from (x.x)% to x.x%
    • Clean up the formatting of Text output
    • Combine functions ProcessIPv4Bindings and ProcessIPv6Bindings into one function ProcessIPBindings
    • Fixed several typos in text labels
    • General code cleanup
    • HTML is now the default output format
    • In IPv4 protocol and IPv4 Scopes DNS Settings, add missing options:
      • Dynamically update DNS records for DHCP clients to do not request updates
      • Disable dynamic updates for DNS PTR record
    • In IPv4 protocol and IPv4 Scopes Policies, add missing Policy data
      • General
        • Lease duration for DHCP client
      • Conditions
        • Condition
        • Conditions
        • Operator
        • Value
      • IP Address Range
        • Added support for multiple IP address ranges
      • Options
        • Option Name
        • Vendor
        • Value
        • Policy Name
      • DNS
        • Enable DNS dynamic updates
          • Dynamically update DNS A (or AAAA) and PTR records only if requested by the DHCP clients
          • Always dynamically update DNS A (or AAAA)  and PTR records
        • Discard A (or AAAA)  and PTR records when lease deleted
        • Dynamically update DNS records for DHCP clients to do not request updates
        • Disable dynamic updates for DNS PTR record
        • Register DHCP clients using the following DNS suffix
        • Name Protection
    • In the various Statistics text output sections, remove the “:” from the text labels
    • Optimize the output of Failover data
    • Removed most of the calls to [gc]::collect
    • Removed function ValidateWordTableValues as it is no longer needed
    • Updated Function CheckWordPrereq to the latest
    • Updated Function SetupWord to the latest
    • Updated Function SetWordCellFormat to the latest
    • Updated Hardware inventory functions to the latest
    • Updated help text
    • Updated ReadMe file (https://carlwebster.sharefile.com/d-s6b941ce3a4643df8)
    • You can now select multiple output formats. This required extensive code changes.

    You can always find the most current script by going to https://carlwebster.com/where-to-get-copies-of-the-documentation-scripts/

    Thanks

    Webster







    About Carl Webster

    Carl Webster is an independent consultant specializing in Citrix, Active Directory, and technical documentation. Carl (aka “Webster”) serves the broader Citrix community by writing articles (see CarlWebster.com) and by being the most active person in the Citrix Zone on Experts Exchange. Webster has a long history in the IT industry beginning with mainframes in 1977, PCs and application development in 1986, and network engineering in 2001. He has worked with Citrix products since 1990 with the premiere of their first product – the MULTIUSER OS/2.

    View all posts by Carl Webster

    No comments yet.

    Leave a Reply