Script to create a report of Citrix Presentation Server v4-v4.5 and XenApp 5 Published Applications in Excel

by Stan Czerno July 21, 2011 13:03 CST

This script uses MFCOM and VBScript to create a report of Citrix Published Applications in Excel.

Let me know what you think about the script and if you have a better way of doing this.

Tags: , , , ,

Catergories: Citrix | XenApp | VBScript

Comments (19) -

Stephan H. Germany
February 8, 2012 10:15 CST

Nice Script... Very Quick... High Detail... Perfect Format... Thanks a lot!!!! Wink

Nicole Australia
June 11, 2012 14:26 CST


Great script, but is there a way to have it report also on Enabled and Disabled applications?


Lal Mohan New Zealand
August 22, 2012 16:22 CST

Awesome Script

Serge Canada
February 27, 2013 05:19 CST

Does this script show what are the configured users for each application?


Halla France
May 23, 2013 09:40 CST

nice script Thanks lots!

Raj India
June 5, 2013 22:28 CST

Truely this is very good script. Working just like bullet speed.

Good work done Czerno Smile

thanks alot

June 4, 2014 00:26 CST

Great job !!!!!
Just one thing to add enabled/disabled into the report would be great.

March 13, 2015 00:40 CST

Thank you for the sharing !

March 23, 2015 01:38 CST

Ultimate script, done a miracle to fetch the data for Citrix 4.0. Thanks alot.

January 22, 2016 03:07 CST

Could you please share the script to list the disabled application in metaframe presentation server 4.0

March 6, 2016 21:59 CST

Hi All,

Using Script we can pull the active sessions users list on presenation server 4.5  please share the script ?

April 7, 2016 16:16 CST

Really nice script Smile. You saved lot of our time.

July 13, 2016 03:58 CST

First I would like to say Thank You for providing the really nice script. I have some issues while running the script and getting and error at line no: 280, Char:2 with Error :unspecified error;  Code : 80004005

Stan Czerno
July 13, 2016 04:17 CST

Are you sure you are running this as a XenApp administrator? Are you running this from one of the XenApp servers? Is the MFCOM service running?

I do not even have anything this old to test against anymore so I cannot really help you. All I have running is XA 6.5 and 7.8.

July 13, 2016 04:56 CST

Thank you for the quick reply.. It seems that I don't have complete access on the Citrix farm. I've executed the script in different farm and it works perfectly. Thank you once again.

Do you have any script for XA 6.5 to get the farm inventory ?

Stan Czerno
July 13, 2016 05:01 CST

Yes, I have a PowerShell equivalent for XA 6.5:

July 13, 2016 21:52 CST

Thank You for the reply!! Script works perfectly.

August 11, 2016 05:41 CST

I get the following if I click yes to application details, works fine if i click no.

queryapps.vbs(144, 4) (null): Unspecified error

This is the code that starts there:
      Set aWinApp = mfApp.WinAppObject

      objExcel.Cells(CurrentRow, 1).Value = mfApp.DistinguishedName
      objExcel.Cells(CurrentRow, 2).Value = mfApp.AppName
      objExcel.Cells(CurrentRow, 3).Value = mfApp.FarmName

      If aWinApp.PNAttributes = 8 Then
              objExcel.Cells(CurrentRow, 4).Value = "Published Desktop"
              objExcel.Cells(CurrentRow, 5).Value = ""
              objExcel.Cells(CurrentRow, 4).Value = aWinApp.DefaultInitProg
              objExcel.Cells(CurrentRow, 5).Value = aWinApp.DefaultWorkDir
            End if
      objExcel.Cells(CurrentRow, 6).Value = appservers
      objExcel.Cells(CurrentRow, 7).Value = appusers
      objExcel.Cells(CurrentRow, 8).Value = appgroups
    End if

Stan Czerno
August 11, 2016 05:51 CST

You'll just have to try to figure out which part is failing by using some wscript.echo lines to see which command is failing. I do not have a farm running this old stuff anymore to confirm it still works.

I would start by trying to use the following to confirm they are working:

wscript.echo mfApp.WinAppObject
wscript.echo mfApp.DistinguishedName
wscript.echo mfApp.AppName

Comments are closed