Ilja Godau Releases Tool to Automatically Document your Citrix PS4 Environments

Rating:
Votes: 27 rating(s),  Score: 118/135
30
comments
21683 views
A Danish Citrix consultant named Ilja Godau has created a tool that can automatically document all the settings of Citrix servers in a PS4 farm. Just double-click the EXE on a PS4 server and it will create HTML pages that show all the servers' settings.
Written by:
Ilja Godau
Publication Date:
July 26, 2005
Tags:
Citrix
Doc #Id: 482


Being a Citrix consultant in Denmark working for TopNordic A/S, I not only design and implement Citrix Presentation Server solutions, but I often have to take a look at implementations done by other consultants. Many times I’ve wanted to pull out the complete documentation of an installation as seen in the Management Console for Presentation Server. As far as I know there no tool for this. Yes, scripts exist for a few options out there, but there’s no complete solution. Manually documenting all the published applications and connections policies is weary work, especially since Citrix is putting more and more stuff into these.

The Citrix PS4 Documentor (or “documenter” for you Americans) is my shot at such a tool that can hopefully avoid pages of screen dumps in the future.

Okay, so what do I do?

The Documentor is easy to use. Just make sure you have the 'Citrix PS4 Documentor.exe' and the 'mfcom.dll' file in the same directory on your PS4 server. (It is important to run it from a PS 4 server itself.) Run 'Citrix PS4 Documentor.exe' and sit back! The program will create HTML files for every section in the same folder that the 'Citrix PS4 Documentor.exe' is executed from.

When documenting your published applications, a folder called 'PS4DocumentorIcons' will be created in your %systemdrive% folder. This folder holds ICO files which are used by the 'Applications Settings.html' file. If you want to transfer this HTML file to another location, remember to also copy the 'PS4DocumentorIcons' folder if you want to have the icon image retained. You may have to edit the HTML file to reflect the correct location of the icon files.

Finally, yes, you have to be logged in with a full Citrix Administrator account. No rights means no documentation! The same goes for the section about the icon folder. No rights for creating a folder on the system-drive means no documenting your published applications.

And that’s about it.

Prerequisites

The Citrix PS4 Documentor needs the Microsoft .NET Framework to be installed. Version 1.1 is preferred.

As its name implies, the Citrix PS4 Documentor only works on Presentation Server 4 servers. Non-PS4 servers are allowed in your farm, but this is not what the software was designed for so it might not work exactly right.

What if I don’t like the layout of the HTML files?

Bummer... <SMILE>

Just open the HTML file, press CTRL-A, press CTRL-C, and paste it into your favorite text or HTML editing tool and change it.

Known Issues

This tool uses MFCOM to extract the information from the Citrix farm, although some settings cannot be accessed via MFCOM, including Resource Manager and Installation Manager settings.

Either due to bugs in the Citrix SDK or my lack of programming experience, some settings generate errors and cannot be documented. (See the readme file for details.)

A Note from Author

I am no great programmer and knocked this together with a simple software editor, so if you find any bugs then please report them to me at ilja@godau.dk.

I am not responsible if you use this program and lock up half your company’s machines or domain. You use this program at your own risk!

I have tested it here on my local domain with Windows Server 2003 and Citrix Presentation Server 4 Enterprise Edition with no problems and it should work on Windows 2000 Server and Citrix Presentation Server 4 Standard and Advanced Edition, but no guarantees are given. Also it does NOT write to the datastore—it just queries it through MFCOM.

Any feedback good or bad welcome to ilja@godau.dk or feel free to share your comments below.

Reader Comments
Program Excenptoin
Tuesday, July 03, 2007 5:24:42 AM

Guest

Does someone have the source code?

How to Use
Thursday, July 19, 2007 10:37:23 AM

Guest
Do you have to run this on each citrix server in the farm or is there a specific server it needs to run from such as the data collector?
Re: How to Use
Tuesday, June 03, 2008 4:25:21 AM

Guest
Just run it on the DS.
Will it work with 4.5
Thursday, July 19, 2007 12:04:47 PM

Guest
Excellent tool
Monday, February 27, 2006 5:08:13 AM

Guest
wow.. It really helped... thx to I Godau !
 
Prolböl
Excellent tool
Monday, February 27, 2006 5:10:17 AM

Guest
ups.. my signature didn't work ...
 
Prolboell ...
RE: Excellent tool
Thursday, March 02, 2006 9:16:07 AM

Guest
Are there known issues with .net 2.0?
The server threw an exception
Friday, August 10, 2007 3:06:56 PM

Guest

I get this error when I try to document my published apps.  Anyone know what it means?

 

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception.
   at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)
   at PS4_Dokumentation.MainForm.Applications_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/winnt/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
Citrix PS4 Documentor
    Assembly Version: 1.3.2017.42009
    Win32 Version: 1.3.2017.42009
    CodeBase: file:///C:/citrixutil/Citrix%20PS4%20Documentor.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/winnt/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/winnt/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 7.0.5000.0
    Win32 Version: 7.10.6001.4
    CodeBase: file:///c:/winnt/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
System.Drawing
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/winnt/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
mfcom
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.0.0
    CodeBase: file:///C:/citrixutil/mfcom.DLL
----------------------------------------
CustomMarshalers
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/winnt/assembly/gac/custommarshalers/1.0.5000.0__b03f5f7f11d50a3a/custommarshalers.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) m

Re: The server threw an exception
Wednesday, September 05, 2007 9:56:51 AM

Guest
I had the same issue, I found that there was a ghost server in the data store.  After downloading the latest dscheck and cleaning up the old server the program ran without issue.
great tool
Thursday, November 15, 2007 5:22:44 AM

Guest
thx, ilja!!
This is great!!!
Tuesday, June 10, 2008 4:19:01 PM

Guest

I had some issues with the Framework security... once I fixed that, I ran it and was able to inventory all the apps in the entire farm

Thank you so much Ilja!!!

Re: This is great!!!
Friday, June 20, 2008 4:56:57 AM

Guest

How did u fix it? Running on the same framework security issue....and Im not a developer so ... *BLUSH*

Any help is muchely appreciated!

Re: This is great!!!
Monday, June 30, 2008 10:12:32 AM

Guest

Having the same issue with the JIT error when trying to run the Applications module - anyone able to suggesta possible fix.

W2K3 SP2 & MPS 4.5

Many thanks.

Post a New Comment
User:
Title:
Comment:
  Type on box the code you see on image below: