Jump to content
Welcome to our new Citrix community!

edit existing content switch policies via cli

Recommended Posts

You'd need to give a bit more information for a complete answer on how your Content Switch vServer is configured as it would depend on Classic vs Advanced policies, where your Public IP address is bound etc.

But, you should be able to edit the Content Switch Policy even though it is in use (bound) to the Content Switching Virtual Server with the 'set' command.


If I construct a basic Content Switch:

add lb vserver LBvServer_test1 SSL 443
add cs action CSAct_test1 -targetLBVserver LBvServer_test1
add cs policy CSPol_test1 -rule "HTTP.REQ.URL.CONTAINS(\"/Test1/*\")" -action CSAct_test1
add cs vserver CSvSvr_test SSL 443
bind cs vserver CSvSvr_test -policyName CSPol_test1 -priority 100 -type REQUEST

I can still directly edit the Policy even though it is in use (bound) with the set command:


(I must admit, I was surprised it allows this - I was expecting to have to unbind the Policy first, or some other approach).


If you had to do this 150+ times, I would create a text file with all the commands and either copy/paste into the CLI via PuTTy, or save the file and run it as a batch job.

Create file, e.g. config.txt and upload it onto the NetScaler to say, /var/tmp/ then run the following at the CLI:

batch -f /var/tmp/config.txt


Best regards



  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...