On Jul 13, 7:08 pm, "Daren Daigle" <ddai...[ at ]bgca.org> wrote:
[Quoted Text] > I am trying to automate a process through powershell to connect via telnet > port to a cisco switch or router. After I do so, log in, have it copy the > running config to a tftp server and disconnect. > > I know how to do the steps manually but i would like to automate this as i > have a large number of switches and routers that I want to capture both the > running and startup configs. > > I have found a script that makes powershell act like a telnet client, but i > am looking for a way to deal with the telnet data like i would from the old > standard of line by line reading like from a text file. > > Any suggestions on how to set up the stream so i can react to and respond > back to the session in say a line by line format (helps for parsing). > > Daren Daigle > Boys and Girls Clubs of America
Lee Holmes' Connect-Computer v2 script is pretty easy to adapt for a combination of interactive and automated processing in a session (if that's what you mean):
http://www.leeholmes.com/blog/default,date,2006-12-04.aspx
Scroll down to 29 Nov 2006, 'Scripting Network / TCP Connections in PowerShell'.
-Hecks
|