On a Cisco switch, set up a TFTP server on your PC. Then in switch CLI, run: copy running-config tftp Enter server IP and filename. It’ll upload the config. Same for IOS images too. Just make sure firewall allows TFTP traffic.
copy running-config tftp