Go smart with Citrix Load Evaluators

Thursday, March 13, 2008
By Edwin

There are two ways to prevent new connections to a CPS.

1. Disable Logons: The problem with this approach is that once the servers are disabled then the users with disconnected sessions can’t reconnect and also administrators can not connect remotely using RPD/ICA for maintenance purpose.

2. Use Empty Scheduling Rule Load Evaluator: Once this LE is applied to the server, the load of the server is made 10000. This way the server won’t take any new connections in load balancing calculations. At the same time, this allows reconnections and remote admin connections as they don’t go through load balancing calculations.

It’s an easy way to do maintenance on your servers. Further you can script this in an MFCOM script an then schedule it.See the example from Frank-Peter Schultze below,


‘ __________________________________________________________________

‘ Script Name:  AttachLE.vbs

‘ Purpose:      Attaches a load evaluator to a Citrix farm server.

‘ Syntax:       attachle servername lename

‘                 servername     The farm server’s computer name.
‘                 lename         The load evaluator’s name.

‘ Author/Email : Frank-Peter Schultze
‘ Last Update  : 05-Mar-2007
‘ __________________________________________________________________

If (WScript.Arguments.Count <> 2) Then
    WScript.Echo “Attaches a load evaluator to a Citrix farm server.”
    WScript.Echo “”
    WScript.Echo WScript.ScriptName & ” servername lename”
    WScript.Echo “”
    WScript.Echo “  servername     The farm server’s computer name.”
    WScript.Echo “  lename         The load evaluator’s name.”
End If
strFarmServer = WScript.Arguments(0)
strLEName = WScript.Arguments(1)
Set objFarm = CreateObject(“MetaFrameCOM.MetaFrameLoadEvaluator”)
objFarm.LEName = strLEName
objFarm.AttachToServerByName False, strFarmServer
Set objFarm = Nothing



Have fun.

One Response to “Go smart with Citrix Load Evaluators”

  1. Josef

    This is a really good script, until you update to XA6.5, then you need a new one.
    but guess, somebody has already done that…


Leave a Reply