• XenApp 6.5 for Windows Server 2008 R2 Documentation Script Version 4.2 Released

    A feature that has been requested in all the XenApp documentation scripts for a good while is the ability to print a specific section of the report. This feature, a couple of bug fixes and several enhancements to speed up script execution are what make up Version 4.2.

    The list of changes in Version 4.2:

    • Fix the SWExclusions function to work if SoftwareExclusions.txt file contains only one item
    • 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
    • Cleanup retrieving services and service startup type with Iain Brighton’s optimization
    • Add Iain Brighton’s Word table functions
    • Move Citrix Services table to new table functions
    • Move hardware info to new table functions
    • Move Citrix and Microsoft hotfix tables to new table functions
    • Move Appendix A and B tables to new table function
    • Add more write statements and error handling to the Configuration Logging report section
    • Add parameters for MSWord, Text and HTML for future updates
    • Add Section parameter
    • Valid Section options are:
      • Admins (Administrators)
      • Apps (Applications)
      • ConfigLog (Configuration Logging)
      • LBPolicies (Load Balancing Policies)
      • LoadEvals (Load Evaluators)
      • Policies
      • Servers
      • WGs (Worker Groups)
      • Zones
      • All

    Sam Jacobs found a bug in the SWExclusions function. If the SoftwareExclusions.txt file contained a single entry, the function did not work. This is now fixed.

    For all the other scripts, I have added new output parameters. 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.

    SYNTAX
        F:\XA65_Inventory_V42.ps1 [-MSWord] [-Hardware] [-Software] [-StartDate <DateTime>] [-EndDate <DateTime>]
        [-Summary] [-AddDateTime] [-Section <String>] [-CompanyName <String>] [-CoverPage <String>] [-UserName <String>]
        [<CommonParameters>]
    
        F:\XA65_Inventory_V42.ps1 [-PDF] [-Hardware] [-Software] [-StartDate <DateTime>] [-EndDate <DateTime>] [-Summary]
        [-AddDateTime] [-Section <String>] [-CompanyName <String>] [-CoverPage <String>] [-UserName <String>]
        [<CommonParameters>]
    
        F:\XA65_Inventory_V42.ps1 [-Text] [-Hardware] [-Software] [-StartDate <DateTime>] [-EndDate <DateTime>] [-Summary]
        [-AddDateTime] [-Section <String>] [<CommonParameters>]
    
        F:\XA65_Inventory_V42.ps1 [-HTML] [-Hardware] [-Software] [-StartDate <DateTime>] [-EndDate <DateTime>] [-Summary]
        [-AddDateTime] [-Section <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:

    • Citrix Services
    • Hardware Information
    • Citrix Hotfixes
    • Microsoft Hotfixes
    • Appendix A
    • Appendix B

    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.

    I am working with a group of very talented and hard-working friends to create a master template script. One of my new EMEA friends, Iain Brighton, showed me a more efficient way to get the list of services that included the startup mode. My original method required two WMI calls. Iain gets it done in one line resulting in less code and much faster execution time.

    When using the new -Section parameter, the report will contain only data for the section you specify. If you need to report on Applications, that is the only data that will be in the report.

    You can always find the most current version of this 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

    6 Responses to “XenApp 6.5 for Windows Server 2008 R2 Documentation Script Version 4.2 Released”

    1. Bill Says:

      Hello Carl,
      I love the work you have put together for the community, a labor of love and much appreciated!

      I have a 6.5 farm still on Posh 2.0. I installed POSH3 on a server about to be decommed but has word installed on it along with all prerequisites. It cant seem to run the Policies section. Total run time is about 1.5 hrs and the report is very nice – again many thanks! my 2 issues i would like to resolve:
      1. for the server section /hot fixes can we pipe that to a CSV to show it in a easier to read format?
      2. Policy section as mentioned above. here is the error
      WARNING: The Citrix Group Policy module Citrix.GroupPolicy.Commands.psm1 could not be loaded
      Please see the Prerequisites section in the ReadMe file
      (https://www.dropbox.com/s/glq4u2p5xte8s6g/XA65_Inventory_V4_ReadMe.rtf).
      Citrix Policy documentation will not take place

      i copied the PS1 files to both locations and ran the import command and still no joy. any other ideas?
      i will try adding POSH5 to my laptop and run from there but hopefully you can shed some light on this . thanks in advanced!!!
      -Bill

      Reply

      • Bill Says:

        edit** forgot to mention word version 2010

        Reply

        • Bill Says:

          edit** i loaded all citrix modules and it runs now but still no data even though there are policies in IMA and AD

          VERBOSE: 01/24/2015 19:01:25: Processing Citrix IMA Policies
          VERBOSE: 01/24/2015 19:01:25: Retrieving IMA Farm Policies
          WARNING: No results returned for Citrix Policy information
          VERBOSE: 01/24/2015 19:01:27: Finished Processing Citrix IMA Policies
          VERBOSE: 01/24/2015 19:01:27:
          VERBOSE: 01/24/2015 19:01:27: See if there are any Citrix AD based policies to proce
          VERBOSE: 01/24/2015 19:01:27: Testing for an Active Directory environment
          VERBOSE: 01/24/2015 19:01:27: In an Active Directory environment
          VERBOSE: 01/24/2015 19:01:27: Searching \\domain.com\sysvol\domain.com\Policies
          VERBOSE: 01/24/2015 19:01:31: There are no Citrix AD based policies to process
          VERBOSE: 01/24/2015 19:01:31:
          VERBOSE: 01/24/2015 19:01:31: Finished Processing Citrix Policies
          VERBOSE: 01/24/2015 19:01:31:

          Reply

          • Carl Webster Says:

            The Citrix.GroupPolicy.Commands.psm1 file MUST be in a folder named Citrix.GroupPolicy.Commands where PowerShell will look for modules.

            The ReadMe file gives these instructions:

            Copy the file Citrix.GroupPolicy.Commands.psm1 to two different places.
            i. C:\Windows\System32\WindowsPowerShell\v1.0\Modules, in a new folder named Citrix.GroupPolicy.Commands.
            ii. C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules, in a new folder named Citrix.GroupPolicy.Commands.

            Did that not work for you?

            If you type in Get-CtxGroupPolicy, what happens?

            On a domain controller, go to c:\windows\sysvol and search for Policies.gpf. Did you find any? That is what determines if an AD policy contains any Citrix settings.

            Thanks

            Webster

            Reply

    2. Pat Says:

      Hi Carl,

      The script for XenApp 6.5 is very slow. I’m running the script on a XenApp 6.5 farm server with no published apps. This server is located on the same datacenter where the Datastore is. Some of our XenApp servers are distributed in different datacenters. If I run the script with the switch “.\XA6_Inventory_V42_Signed.ps1 -section Servers” it runs very slowly from “Gather server info for Appendix B” until the end for many hours. It’s the same thing for many of the other sections.

      I don’t know if you got this feedback before?

      Reply

      • Carl Webster Says:

        What version of Word?
        What version of PoSH?
        Can you run the script from a computer with PoSH V5 installed? I have seen an 85% performance improvement when the script is run under PoSH V5.

        Webster

        Reply

    Leave a Reply