• Provisioning Services Documentation Script Version 4.2 Released

    August 6, 2014

    PowerShell, PVS

    I have been working with a very talented and hard-working group of friends to help speed up the runtime of the various documentation scripts.  This update of the Provisioning Services (PVS) script is the first step towards the goal of having the scripts run as fast as possible and also towards providing formatted text and HTML output.

    Here is the list of changes in version 4.2:

    • Cleanup the script’s parameters section
    • Code cleanup and standardization with the master template script
    • Requires PowerShell V3 or later
    • Removed support for Word 2007
    • Word 2007 references in help text removed
    • Cover page parameter now states only Word 2010 and 2013 are supported
    • Most Word 2007 references in script removed:
      • Function ValidateCoverPage
      • Function SetupWord
      • Function SaveandCloseDocumentandShutdownWord
    • Function CheckWord2007SaveAsPDFInstalled removed
    • If Word 2007 is detected, an error message is now given and the script is aborted
    • Cleanup Word table code for the first row and background color
    • Add Iain Brighton’s Word table functions
    • Move Appendix A and B tables to new table function
    • Move hardware info to new table functions
    • Move audit trail info to new table functions
    • Add parameters for MSWord, Text and HTML for future updates

    I have added new output parameters for Text and HTML (for future updates). The parameters section was getting very ugly looking and over complicated. Turns out I was making that section much more difficult than it needed to be. After simplifying the code, the help text for the parameters, to me, looks much better. Even though this script will not get formatted text or HTML output options, the cleaner parameters section was needed.

    SYNTAX
        F:\PVS_Inventory_V42.ps1 [-MSWord] [-Hardware] [-StartDate <DateTime>] [-EndDate <DateTime>] [-AddDateTime]
        [-AdminAddress <String>] [-Domain <String>] [-User <String>] [-Password <String>] [-CompanyName <String>]
        [-CoverPage <String>] [-UserName <String>] [<CommonParameters>]
    
        F:\PVS_Inventory_V42.ps1 [-PDF] [-Hardware] [-StartDate <DateTime>] [-EndDate <DateTime>] [-AddDateTime]
        [-AdminAddress <String>] [-Domain <String>] [-User <String>] [-Password <String>] [-CompanyName <String>]
        [-CoverPage <String>] [-UserName <String>] [<CommonParameters>]
    
        F:\PVS_Inventory_V42.ps1 [-Text] [-Hardware] [-StartDate <DateTime>] [-EndDate <DateTime>] [-AddDateTime]
        [-AdminAddress <String>] [-Domain <String>] [-User <String>] [-Password <String>] [<CommonParameters>]
    
        F:\PVS_Inventory_V42.ps1 [-HTML] [-Hardware] [-StartDate <DateTime>] [-EndDate <DateTime>] [-AddDateTime]
        [-AdminAddress <String>] [-Domain <String>] [-User <String>] [-Password <String>] [<CommonParameters>]
    

    This script contains code from the master template script and therefore requires PowerShell version 3 or later. Also, Word 2007 is no longer supported.

    This script contains the code for Iain’s new table functions and several tables had already been converted:

    • Audit Trail
    • Hardware Information
    • Appendix A
    • Appendix B

    Iain’s table functions populate Word tables about 95% faster than my old method.

    When I was creating the DHCP and Active Directory scripts, I found out the code I was using for the header row in a Word table was too verbose. I learned how to reduce the lines of code needed to set the header row and give it a background color and make the text bold.

    Over time, I will move all the Word tables in this script to use Iain’s new table functions. I will also start adding formatted text output so Microsoft Word is not required to run the script. Eventually, HTML output will be added once someone comes up with a generic way to create HTML output that works in the master template script.

    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

    Webster is a Sr. Solutions Architect for Choice Solutions, LLC and specializes in Citrix, Active Directory and Technical Documentation. Webster has been working with Citrix products for many years starting with Multi-User OS/2 in 1990.

    View all posts by Carl Webster

    2 Responses to “Provisioning Services Documentation Script Version 4.2 Released”

    1. Jack Lyons Says:

      Why did you remove support for Word 2007 does your script use some new technology that requires the newer versions of office.

      Thanks
      Jack

      Reply

      • Carl Webster Says:

        no new technology but the COM object stuff in word 2007 was driving me nuts. i had to have separate sections of code for 2007 and 2010/2013. In moving the script to provide options for faster table creation and populating and saving to different output formats, word 2007 was a major drag on my time. Since 2007 is out of support, I dropped support for it.

        Webster

        Reply

    Leave a Reply