Microsoft Virtualization Discussions

Invoke-NaSsh passing multiple commands to Cisco MDS

XOMBAC2012
2,509 Views

Greetings,

Working on script to set some standard settings on Cisco MDS switches using the Invoke-NaSsh from the PowerShell Tool kit. I can pass a single command (i.e. SHOW VSAN 1), but passing multiple commands (i.e. CONFIGURATION TERMINAL;SYSTEM DEFAULT SWITCHPORT SHUTDOWN;EXIT), I get a Cmd exec error.

 

I can stack the commands in format above with PLINK (PuTTY CLI), but can ot seem to get it work with Invoke-NaSsh

 

Current CMD line:

Invoke-NaSsh -name $switchIP -command "configure terminal;system default switchport shutdown;exit" -credential $credentials -ErrorAction SilentlyContinue -WarningAction SilentlyContinue 

1 REPLY 1

JGPSHNTAP
2,498 Views

The only thing I can say is from my experience is that the stacked commands work for netapp, i'm not sure if they work for cisco. 

Public