• Documenting a Citrix Provisioning Services Farm with Microsoft PowerShell and Word – Version 3

    July 18, 2013

    PowerShell, PVS

    Now that Citrix has released Provisioning Services (PVS) 7, it was time to update the PVS documentation script to add support for PVS 7.  This article documents the changes made to the script.

    To start off with, this updated script would not have been possible without a hard-working, dedicated group of testers.

    • Anton van Pelt
    • Chris Staton
    • Dane Young
    • David Figueroa
    • Jarian Gibson
    • Kees Baggerman
    • Martin Therkelsen
    • Rene Vester
    • Robin Plomp
    • Stephane Thirion
    • Thomas Gamull

    PVS 7 includes four new items.  The XenDesktop Setup Wizard adds Local write cache disk and Boot mode as seen in Figure 1.

    Figure 1
    Figure 1

    There are also Streaming IP addresses and Management IP  as shown in Figure 2.

    Figure 2
    Figure 2

    Citrix also added the text (minutes:seconds) to two items in the Advanced button of the properties of the Server as shown in Figures 3 and 4.

    Figure 3
    Figure 3
    Figure 4
    Figure 4

    This necessitated the need for a Function to convert seconds to minutes:seconds.

    Function SecondsToMinutes
    	Param( $xVal )
    	If( [int]$xVal -lt 60 )
    		Return "0:$xVal"
    	$xMinutes = ([int]($xVal / 60)).ToString()
    	$xSeconds = ([int]($xVal % 60)).ToString().PadLeft(2, "0")
    	Return "$xMinutes`:$xSeconds"

    Previous versions of PVS also displayed the time selected in the slider as minutes:seconds but the (minutes:seconds) text is not there in the GUI.

    There was other glaring glitch I noticed when the testers from outside the USA sent me their sample reports.  My Word 2007/2010/2013 are set for Default Tab Stops of ½ inch.  But I noticed that some reports had tab stops of 3/8 inch, some 5/8 inch and also 7/8 inch.  That was driving me crazy since all the reports looked different.  After much trial and error, I found the solution was to use PowerShell to set the DefaultTabStop property of the Word document.

    $Word.ActiveDocument.DefaultTabStop = 36

    The setting is configured in points where 72 points is 1 inch and 36 points is ½ inch. This setting, so far, has worked in all the sample reports sent to me by testers in five different countries.

    Once I figured out how to set the DefaultTabStop, I was able to get all the items in the report to align properly.  Thanks to all the testers for putting up with a flurry of script changes over two days to get every section (that the testers had data for) aligned properly.

    Please let me know if you spot anything not aligning properly.

    Since this is a major change to the script, the version number has changed to V3.  V4 development is already under way.

    If you have any suggestions for the script, please let me know.  Send an e-mail to webster@carlwebster.com.

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



    , , , , ,

    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 “Documenting a Citrix Provisioning Services Farm with Microsoft PowerShell and Word – Version 3”

    1. Chad Says:

      I tried to run V3 on a PVS 6.1 server and the script loads the snapin McliPSSnapin just fine then immediately returns an error indicating it could not find the property ‘storeName’. Have you seen this before in your testing on PVS 6.1?



    Leave a Reply