Calling on 3 text files for changing interface decscriptions
I have a need to change about 400 interface descriptions on Cisco 3750 switches. I have a list of device names, interfaces and the correct descriptions. I want a script that will log into the first device on the list, then the interface and then the description. Is this posible?
I already have a script that I use to log onto multiple devices and add config, but I dont fully understand it, just was I need to change each time to make it work. So I dont know how to modify it in this case.
Here is was I use currently;
Dim fso, fil, user, passwd, line, params
Set fso = CreateObject("Scripting.FileSystemObject")
Set fil = fso.OpenTextFile("C:\List.txt", ForReading, 1)
Do While fil.AtEndofStream <> True
line = fil.Readline
' params = Split(line, ",")
crt.Screen.Synchronous = True
crt.screen.send "ssh" & " " & line & vbcr
nResult = crt.Screen.WaitForString("?", 10)
if nResult = 0 Then
' msgbox params(0) & " " & "Not Found"
' metname1 = params(0)
' port1 = params(1)
' strmetname1 = strmetname1 & metname1 & "," & params(1) & vbcrLf
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile("C:\NoAccess.txt", ForWriting)
crt.Screen.Send "yes" & chr(13)
crt.Screen.Send "PASSWORD" & chr(13)
crt.screen.send " logout" & vbcr
crt.Screen.Synchronous = False
Any help would be much appreciated.
Could you clarify what you mean in the statements below?
The scripting manual that is available here on our website is the best resource for VBScript tips in regards to automating tasks in SecureCRT.
|Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)|
|Display Modes||Rate This Thread|