• PVS Documentation Script Has Been Updated 16-MAR-2013

    March 16, 2013

    Blog, PowerShell, PVS

    I found a Copy and Paste error in the PVS documentation script. This was brought over from the XenApp 6.5 script. The Subject line for the Cover Page (which you only see depending on which Cover Page is selected) was hard-coded to state “Provisioning Services 6.5 Farm Inventory”. Instead of using the actual PVS version number, 6.5 was copied and pasted from the XenApp 6.5 script. OOPS, sorry about that.

    Before
    Before

    The code was:

    write-verbose "Set Cover Page Properties"
    _SetDocumentProperty $doc.BuiltInDocumentProperties "Company" $CompanyName
    _SetDocumentProperty $doc.BuiltInDocumentProperties "Title" $title
    _SetDocumentProperty $doc.BuiltInDocumentProperties "Subject" "Provisioning Services 6.5 Farm Inventory"
    _SetDocumentProperty $doc.BuiltInDocumentProperties "Author" $username
    

    This was easy to fix. Early in the script I have to determine if the script is running on PVS 5.x or PVS 6.x since they have different options to process. I simply added a line to grab the first three characters of the PVS version.

    $PVSVersion     = $Version.mapiVersion.SubString(0,1)
    $PVSFullVersion = $Version.mapiVersion.SubString(0,3)
    

    Then I fixed the Subject document property line.

    write-verbose "Set Cover Page Properties"
    _SetDocumentProperty $doc.BuiltInDocumentProperties "Company" $CompanyName
    _SetDocumentProperty $doc.BuiltInDocumentProperties "Title" $title
    _SetDocumentProperty $doc.BuiltInDocumentProperties "Subject" "Provisioning Services $PVSFullVersion Farm Inventory"
    _SetDocumentProperty $doc.BuiltInDocumentProperties "Author" $username
    

    Now the Subject shows the correct PVS version on the Cover Page.

    After
    After

    Again, sorry about that.

    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

    One Response to “PVS Documentation Script Has Been Updated 16-MAR-2013”

    1. donovan sobrero Says:

      another out standing solution for documentation.
      thank you vary much

      Reply

    Leave a Reply