Microsoft Virtualization Discussions

Invoke-NaSsh passing multiple commands to Cisco MDS

XOMBAC2012

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

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. 

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public