So I was recently doing some troubleshooting and needed to do a “show tech all” on a couple of our Switches to do some further analysis. My usual way was to fire up PuTTY (or KiTTY which is an improved “fork” of Putty) and do a “show tech all” then manually copy and paste into a waiting notepad window to save the text file.
I recently found out there is a copy command that allows an administrator to copy a large number of configuration and logs files from a switch as well as a command-output option which allows an administrator to specify a CLI command to copy output of. All you need to take advantage of this feature is an TFTP or SFTP server to copy the output to. So a sample output to a TFTP server would be (where the IP address is your TFTP server and what ever filename you want to save the output as)
copy command-output "show tech all" tftp 172.16.20.57 show_tech_all.txt
After entering that in, you will see the switch perform the TFTP download with the output of the specified CLI command. Once done, navigate to your TFTP (or SFTP) server Root Directory and you’ll have a show_tech_all.txt file ready to open in Notepad. You can also do running config (swName# show run) and crash logs using the method above, just to TAB completion on the copy command to see what is available on your particular switch.