Disable an Application in a Citrix Farm
Description
The DisableApp tool allows you to disable an application in a farm.
Script Version
1.0
How to Use DisableApp
To disable an application in a farm, issue the following command on the command prompt where the script resides:
> DisableApp.wsf <ApplicationDisableName>
Note: To enable an application, use the EnableApp tool.
Code Snippet
Search through all applications in the farm to find the application. If the application exists, load the application object:
app1.Initialize MetaframeWinAppObject,appDN
app1.loaddata(true)
Disable the application:
app1.EnableApp=0
Save the application:
app1.savedata()
Disclaimer
These software applications are provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.
Comments (6)
Jan 20, 2009
Anonymous says:
The script echo's my Farm Name correct, but gives the error "App Not found&...The script echo's my Farm Name correct, but gives the error "App Not found!". I cannot seem to get the script to work on a Presentation Server 4.0 for W2K3 or W2K3x64. Does anyone have suggestions?
Feb 03, 2009
Anonymous says:
Same here. Do you have a solution?Same here. Do you have a solution?
Feb 03, 2009
Anonymous says:
Add Applications/ before the apps name, e.g. DisableApp.wsf "Applications/Applic...Add Applications/ before the apps name, e.g. DisableApp.wsf "Applications/Applicationname"
Apr 21, 2009
Anonymous says:
it runs, but its very slow. Is there any way to speed up the process?it runs, but its very slow. Is there any way to speed up the process?
Jun 03
Anonymous says:
i needed to do the following to work >cscript disable.wsf "Applications/fold...i needed to do the following to work
>cscript disable.wsf "Applications/foldername/appname"
("folder structure as if looking at the Citrix Manage Console")
i.e >cscript disable.wsf "Applications/Microsoft Office/Microsoft Word"
Jul 07
Ed Burke says:
A quick an easy work around to disable multiple applications is to call the scri...A quick an easy work around to disable multiple applications is to call the script via a batch file. You do need to comment out or remove the two following lines at the end of script to avoid the "Press ENTER to exit..." prompt
After this use the following logic in your batch file to enable your applications (it's not pretty but it does the job in a pinch):
Add Comment