Jump to content
Welcome to our new Citrix community!

Batch command doesn't work no matter the command

Recommended Posts

I'm looking to import some commands and save the output. However, any command I enter in a file, I get an error. If I copy them to the command line, they apply just fine. Is there are limitation or requirement to use batch? They are command copied from a good config. 


This is a fresh config based on


Any ideas?



Link to comment
Share on other sites

Can you share a few lines of text from the actual batch script, in case there is a character issue or command line issue.  Can't confirm in image if there are em-dashes vs. en-dashes.

I would also try omitting the -clttimeout and see if it behaves or flags a different parameter.

Which text editor did you write the file in in case it did some weird character formatting.


Finally, are you running actual CLI commands that you typed in or reapplying a saved ns.conf file?  This can be problematic as the line terminating characters and some of the other command formats are different if you just copied a raw ns.conf file into a batch (or try to execute as one.)


The commands should work and there shouldn't be a problem from what I can see.

Note: I'm testing on a 13.0 system (in case this is version specific for you)


Here's my example batch file (exact contents):

add lb vserver lb_vsrv_demo3 http 80 -clttimeout 9000
add service svc_demo3a http 80
bind lb vserver lb_vsrV_demo3 svc_demo3a
show lb vserver

Exact command to run from CLI:

 batch -fileName /var/log/LABSCRIPTS/testscript.bat


So, if the sample script also fails, then it is something specific to your version (maybe).



Link to comment
Share on other sites


Thanks for the answer. I'm thinking its something with that firmware version. Even if I have a single command, in my file, or by using the examples here > How to Apply a Set of Configurations on a NetScaler Appliance by Using the batch Command (citrix.com), they still all fail.  Oh, well. I just copied and pasted a bunch of commands to the prompt and did it that way.

Link to comment
Share on other sites

  • 1 year later...

I just ran into this same issue when attempting to run a batch command on 13.0-91.13. I was getting "Invalid value" errors for each line in the output file. I never had this issue running configuration batch on NetScaler 12.1. I tried adding a space to the end of each line, and that fixed it. Just a heads up for anyone else that might run into this.

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...