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