I am using Brocade switch to run this command
Step 1. Log in to Brocade switch with root user name
Step 2.Run the below command
Brocade:root> cfgsave
Step 3. After this cmd is executed i will get below message
"You are about to save the Defined zoning configuration. This
action will only save the changes on Defined configuration.
Do you want to save the Defined zoning configuration only? (yes, y, no, n): [no]" y_
Step 4. I need to select "yes" option.
I wrote powershell script to run this cmd from my computer with SSH-Session module.
$d1 ="10.226.232.137"
$u1 ="test"
$p1 ="password"
$c1 = "cfgsave"
New-SshSession $d1 -Username $u1 -Password "$p1"
$Results = Invoke-Sshcommand -InvokeOnAll -Command $c1
It simply hangs there to get yes or no response.
How to pass yes or no response in powershell for above issue?