putty【cmd命令】

  1. 登陆串口,并且记录log
https://blog.csdn.net/hansel/article/details/114682539

putty -serial COMxxx -sercfg 115200,8,n,1,N -sessionlog xxxx.log
  1. 更加复杂的操作
https://stackoverflow.com/questions/27477658/save-putty-output-to-file-from-command-line

Enter Host Name, Name the session, Go to Logging Option in the left top corner, select all sessions, provide log file name and location, 
go back to Session tab, click on the save button. Done, you have saved a session
Now open CMD and write the command as below enter image description here
putty -l User -pw Password -load "MyServer" -m CommandFile.ext
You are done. Every time this session is invoked, the commands and output will be logged. Hope this helps.
原文地址:https://www.cnblogs.com/amize/p/15798482.html