In Citrix you can apply artificial load to your Application Servers to prevent new users from attaching to the server. By doing this you allow existing connections to gracefully wean from the Citrix server you would like to do maintenance on instead of abruptly kicking them off. This can be done through your Citrix XenApp PowerShell SDK. Download and install the SDK for your version of XenApp at http://community.citrix.com/display/xa/Download+SDKS.
Create a Citrix Server Maintenance Mode Load Evaluator
1) Logon to a Citrix XenApp Application Server
2) From the Start Menu launch the Citrix XenApp Server SDK (x86)
3) Type Set-ExecutionPolicy RemoteSigned
4) Type Y and Press Enter
5) Type New-XALoadEvaluator ServerMaintenance -description “Remove Citrix Servers from Production for Maintenance” -ContextSwitches 0,1 press enter
Note: This will create the new load evaluator and provide you with a summary as shown below.
6) Type Get-XALoadEvaluator ServerMaintenance and press enter to validate the load evaluator exists
7) Type Set-XAServerLoadEvaluator -ServerName ServerName -LoadEvaluatorName “ServerMaintenance” and press enter to apply the new load evaluator
8) Type Get-XAServerLoad and press enter to verify that load is at 10000 which will prevent new connections without interrupting the current users
Note: Be sure to monitor user connections until there are not anymore users attached to the server and then complete your Citrix server maintenance.