Documenting a Citrix XenApp 6 Farm with Microsoft PowerShell

How to use this script?

I saved the script as XA6_Inventory.ps1 in the C:\PSScripts folder. From the PowerShell prompt, change to the C:\PSScripts folder, or the folder where you saved the script. From the PowerShell prompt, type in:

.\XA6_Inventory.ps1 | out-file .\XA6Farm.txt and press Enter.

Open XA6Farm.txt in either WordPad or Microsoft Word (Figure 36).

Figure 36

The first update I have planned for this script is to implement generating the output in Word format. This will allow for using Word Headings and formatting. If you have any suggestions for the script, please let me know. Send an e-mail to [email protected]

I have placed an unsigned copy of this script at http://dl.dropbox.com/u/43555945/XA6_Inventory.ps1 .

I have also placed a copy of the script with a TXT extension at http://dl.dropbox.com/u/43555945/XA6_Inventory.txt .

I have placed a digitally signed copy of this script at http://dl.dropbox.com/u/43555945/XA6_Inventory_Signed.ps1 .

I have also placed a copy of the digitally signed script with a TXT extension at http://dl.dropbox.com/u/43555945/XA6_Inventory_Signed.txt .

,

About Carl Webster

Webster is an independent consultant in the Nashville, TN area and specializes in Citrix, Active Directory and Exchange. Webster has been working with Citrix products for many years starting with Multi-User OS/2 in 1990.

View all posts by Carl Webster

7 Responses to “Documenting a Citrix XenApp 6 Farm with Microsoft PowerShell”

  1. Ismael Says:

    Hi Carl,

    I have been learning so much from your notes.

    How can I print this one? I would like to read it on the train…

    Thanks, Ismael

    Reply

  2. Sreekanth Says:

    WOW!!! Carl!!!

    Your scripts are amazing, keep up the great work!!!

    And by the by is there anyway we can only export the “ACTIVE” settings of XenApp6.5 each Policies to XL sheet or HTML?

    Once again its really great article, keep writing..!!!

    regards,
    Sreekanth

    Reply

    • Carl Webster Says:

      Sreekanth,

      Thanks for the kind words.

      I do think there is a simple change you can make to the Get-CtxGroupPolicy funcrion in the Citrix provided psm1 file.

      Take this section:

      foreach ($pol in $pols)
      {
      $props = CreateDictionary
      $props.PolicyName = $pol.Name
      $props.Type = $poltype
      $props.Description = $pol.Description
      $props.Enabled = $pol.Enabled
      $props.Priority = $pol.Priority
      CreateObject $props $pol.Name
      }

      and change it to this:

      foreach ($pol in $pols)
      {
      If($pol.Enabled)
      {
      $props = CreateDictionary
      $props.PolicyName = $pol.Name
      $props.Type = $poltype
      $props.Description = $pol.Description
      $props.Enabled = $pol.Enabled
      $props.Priority = $pol.Priority
      CreateObject $props $pol.Name
      }
      }

      I believe that will do what you are asking for.

      Thanks

      Webster

      Reply

  3. Tom K. Says:

    Wow. I worked alongside the article for the first pages and was having success in my own environment as I tried to duplicate the sample pieces of posh code. A good way to learn, but then I looked ahead and upon seeing the sheer amount of code-yet-to-come I jumped to the last page and was relieved to see it had been all put together and made available for donwload.

    Not being a coder or developer by nature or proefession I am always looking for examples I can emulate and hopefully learn from,but in this case I was going to be happy if I could download some or all of this and just have it handy. I can’t tell you though how amazed I was when the entire final script with all of those components contained within ran the first time I tried it in my environment on a XA6 server with the SDK installed. It’s never that easy, at least never has been before when I’ve copied other’s scripts. This is a testament to Mr. Webster’s attention to detail and thoroughness. Thanks man.

    Reply

Trackbacks/Pingbacks

  1. Documenting a Citrix XenApp 6 Farm with Microsoft PowerShell « Roshan Ratnayake – Solution Architect - December 22, 2011

    [...] Awesome Script to document XenApp 6 Farm.. Read the full story here :http://carlwebster.com/documenting-a-citrix-xenapp-6-farm-with-microsoft-powershell/ [...]

Leave a Reply