#$language = "VBScript"
#$interface = "1.0"
crt.Screen.Synchronous = True
' This automatically generated script may need to be
' edited in order to work correctly.
' https://www.runyf.cn
Sub main
log_file = inputbox("请输入会话日志文件名","提示信息")
crt.Session.LogFileName = "D:\Crtvbs\log\"&log_file&".txt"
'日志文件保存在D:\Session目录
Call crt.Session.Log(True)
'开启会话日志
crt.Screen.Send "show clock" & VbCr
crt.Screen.Send "show version" & VbCr
crt.Screen.Send "show running-config" & VbCr
Do while (crt.Screen.WaitForString("-MORE--",3)<>False)
crt.Screen.Send " "
Loop
Call crt.Session.Log(False)
'关闭会话日志
End Sub
最后修改:2023 年 05 月 02 日
© 允许规范转载