Windows Live Alerts
EnglishDeutsch
|
Contact
|  
   
 
Start access
Article
Support Forum
SBC FAQ
XenApp/XenDesktop
Remote Desktop Services
Terminal Services
Web Interface
Tips & Tools
Sponsors 
 
Lassen Sie sich von einem Experten Beraten

Publish Application management Print E-mail

You have Published some or a lot of Applications and you have to remove or add a server from/to ALL Published Applications (PA). If you do that in the CMC you will get bloody fingers! The best way is to script the process or use utilities to reach the goal.


SETPROP Utility  (SDK 2.2)

With that SDK Utility you can SET the PROPerties of a PA. Setprop is part of the APSDK (Application Publishing SDK). To see ALL possible options,  run SETPROP. Be carful with the AppDN value (Application Distinguished Name) it's CASE SENSITIV !

Image NOTE
You have to install at least Hotfix XE102W083 when you get "Debug Assertion Failed" error

To remove a server from a spesific publish application use the
command:
setprop AppDN /ds Servername

Example:
setprop "\Applications\My_CMC_Folder\My_Publish_App" /ds Citrix_Servername
 


To add a server to a spesific publish application use the
command:
setprop AppDN /as Servername

Example:
setprop "\Applications\My_CMC_Folder\My_Publish_App" /as Citrix_Servername


Image NOTE
Within the Citrix Server SDK 2.3 you will also find some wsh files to add and remove PA's from a Server. I added also scripts to add or remove server from or to all PA's in an existing Fram using the enum utility. You can also compile the C source files and make some execution files.

Image use_setprop.zip



APPUTIL Utility  (only with FR3 or above)

With MetaFrame XP 1.0 Feature Release 3 Citrix has added a utility called APPUTIL that can be used to add (i), remove (/u) or query (/q) Publish Applicaions. Since this utility uses the Application ID you don't have any problems with the AppDN as in previous SDK tools.


Basicly the script is calling the apputil two times in one command to remove or add all Publish Applications of an existing Citrix Farm. First a query to get ALL PA ID's and use the result to add command /i or remove command /u All PA's from a specific server.

Example to remove ALL PA's from a server in a command line:

For /f "skip=4 tokens=1,3" %i in ('apputil /q') do apputil /u %i ctx_srv_name

 

How to Add a Server to  PA's that another server, already has assigned to?

This was an request from Nicola (Italia). He wanted to add a Server (SRV2) to the same PA's that another Server (SRV1) already has. I'm not a vbs scripting guy nor vb.Net and my solution is not as good as it could be but it was a quick and dirty job... So first I changed the source code from query.exe and recompiled the code (the bad part for me and a lot of space for optimation, and properly everything could be done with only one exe file...).
Next was to build the script. First it runs a query on the SRV1 Server to see what PA's are assinged to that Server and stores the result in a temp file. In the last step the PA's from the temp file will be added to the second Server SRV2.

Run on a Citrix Server the command line:
AddPA2Srv2 Citrix_Server_1_Name Citrix_Server_2_Name


Image AddPA2srv2.zip



Program Applicationmanagement

Citrix has published a Program where you can manage application from the command line. You can also export or import publish applicationsto an xml files.



 
find or follow me @