Manage Citrix Applications
'Manage Application Pools' makes it possible to enable and disable Citrix applications during a release. Connections to the Citrix broker server is being made with WinRM (HTTP 5985 or HTTPS 5986). This task is tested on a Citrix 7.14 environment. Please be so kind to let me know if it works on different versions too.
Version 1* contains the following functions
Handling multiple applications is supported. The names need to be comma devided. (app1,app2)
How does it work?
After creating a WinRM session to the broker server, the powershell module 'Citrix.Broker.Admin.V2' is imported. This module is part of the Citrix SDK, but should be available on the broker server by default. The application is being found by searching for the browsername, since this one seems to be unique. Based on this result, the application is being handled.
Sessions are being terminated based on the UID of the application and sessions that using this UID. Be aware that the Citrix user does not receive a notification when the session is terminated. I'll add this feature in the future upon request.
Tips & tricks
Run the following powershell command on the broker server to find the browsername of your application: