In this article, I will briefly explain how to backup running configuration of your Dell switches to a TFTP server location using PowerShell.
Prerequisites
- A TFTP server should be configured and running
Workflow
- Get a list of IP address of switches that needs to be backed uplist = Get-Content .\switch_list.txt
- Collect credentials to SSH into the switch$creds = Get-Credential
- Create a new SSH session to the first switch in the list$sw_ssh = New-SshSession -ComputerName 192.168.10.2 -Credential $creds -Force -ConnectionTimeout 300
- Invoke the command to backup running config to TFTP server over the SSH session$filename =(Get-Date).tostring("dd-MM-yyyy-hh-mm-ss")$cmd_backup = "copy running-config tftp://192.168.11.33/sw01/$filename.txt"Invoke-sshcommand -Command $cmd_backup -SSHSession $sw_ssh
- Repeat step 3 and 4 for all the switches in the list
Complete project reference
Note
You can schedule this PS script using a task scheduler so that the running configuration of switches can be backed up automatically on a daily basis or as per requirements.
Hope this was useful. Cheers!
Related article
Cisco switch configuration backup using PowerShell
Hope this was useful. Cheers!
Related article
Cisco switch configuration backup using PowerShell
No comments:
Post a Comment