Microsoft Virtualization Discussions

Highlighted

Invoke-NaSsh passing multiple commands to Cisco MDS

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
Highlighted

Re: Invoke-NaSsh passing multiple commands to Cisco MDS

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. 

Try the NEW Support Site!
NetApp Support Site
Forums