title: Multiple commands using Plink and batch file for Cisco switch
body: <p>I am currently trying to write a script to change the location (snmp) of more than 200 Cisco switches.</p>
  
  <p>My problem is that I can't run more than one command at once. I've made a batch file which connects to the switch automatically and reads a .txt file where the commands are listed. But no matter what I do the best result I got was that only the first command was executed.</p>
  
  <p><strong>batch File:</strong> </p>
  
  <pre><code>cmd.exe /c echo n | "Filepath(plink)" -ssh Switch Hostname -l Username -pw "Password" -m "txt File"
  </code></pre>
  
  <p><strong>txt File:</strong></p>
  
  <pre><code>conf t
  snmp-server location test
  end
  wr
  exit
  </code></pre>
  
  <p>I've already tried other delimiters in the txt-File like <code>;</code> <code>|</code> etc.
  But nothing seems to work.</p>