Add list of Computers to Citrix Load Balancing Policy

When creating a Citrix load balancing policy it is simple to add a list of computers to filter by client name.

First create a load balancing policy either through citrix DSC or powershell.
New-XALoadBalancingPolicy Pol1 -Description 'Test policy' - This creates a policy with the name Pol1 and description Test policy.
Set-XALoadBalancingPolicy -PolicyName Pol1 -Enabled 0 - This disables the policy, just in case you mess up somewhere.

Create and run powershell script from the following code


Contributed by David Rowe