While loop for connecting on mltiplw server through ssh

How to apply while loop for connecting multiple server and run multiple commands on it .While or for loop should be in studio activity

Hi @priyanka_tambe
Welcome to the community.
You can store all server names in a collection and use for each loop to iterate through that collection. Write code in the for each loop body to connect to server and run commands.

@Surya_Narayana_Korivipadu I stored the IP_addresses in one excel file.and I have written a script with .exp file on linux server & in studio I run that script through powershell by passing arg (IP), But I’m getting error " Expect script error send: Spawn id exp4 not open while executing".

ok. I don’t have much idea about this error.

Ok, Thanks for your time

1 Like

Hi @priyanka_tambe

this might help