11-13-2017 02:45 AM - edited 03-01-2019 06:16 AM
When I try using plink to execute switchport description commands I am having a problem
interface fc1/9 ;
switchport description Server_1 ;
interface fc1/10 ;
switchport description Server_2 ;
EXIT
results in the port description for fc1/9 being changed to :
Server_1 ;interface fc1/10 ; switchport description Server_2 ;EXIT
I have tried enclosing the name in "" & '' but the quotes are just included in the description.
Other scripts using multiple lines that end with ; work fine.
11-13-2017 02:55 AM
I forgot to mention the switch is an MDS 9513 on version 6.2(19)
11-13-2017 05:08 PM
11-13-2017 04:06 PM
11-14-2017 01:47 AM
Thanks for the replies but I think my situation is different. I am not logging onto the switch to execute the script. I use plink to run the commands from an external txt file
plink -load switch1 -m commands.txt > output.doc
I have been using conf t - just forgot to paste into the example.
I have to use ; for multiple lines and it works perfectly - the only problem I have is with the switchport description command as it doesn't seem to recognise where the text for the description ends.
I tried enclosing in quotes but that fails with syntax error
11-14-2017 08:23 AM
11-14-2017 08:25 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide