Edit a network config using a script
Edit config change scripts to update access lists, modify community strings, or make other configuration changes. Before you write a script, be sure you know the commands required to make changes on the device and the basics of variables and logical structures. This guide does not address device-specific CLI commands.
Scripts are often used to make bulk changes to multiple devices. SolarWinds recommends running a script on one device to test your changes and, if you verify your changes and they are successful, then apply the script to multiple devices.
This topic provides steps on how to add, edit, and verify a config change script for one or more devices.
Before making changes to a config, make sure that the config has been backed up.
Add a config change script
To edit a config using a script, you must first add a config change script.
The following example shows how to add a SolarWinds banner config change script. The commands in this script run on a Cisco device.
- Click My Dashboards > Network Configuration > Configuration Management.
- Click the Script Management tab.
-
Click Add New Script.
- Enter the script information and click Save.
The script is displayed in the Script Management tab.
Edit a config using a script
The following example shows how to execute the SolarWinds banner script against a node managed in NCM.
- Click My Dashboards > Network Configuration > Configuration Management.
-
Select the configuration item to edit and click Execute Script.
-
Select a script and click Execute.
- To view the change you just made, log in to the device. This is an example of the script banner change for the device.
Verify config changes by comparing config versions
After you change a login banner, you can log in to the device to verify the change. For more complex changes, you can verify the change by viewing a report that compares the configs before and after the change. Because the config change report compares configs line by line, you can also use the report to troubleshoot issues.
The following example shows that the config was updated on August 4, and the report highlights the differences between the config before and after the change.
- Click My Dashboards > Network Configuration > Config Summary.
-
Navigate to the Last 5 Config Changes resource and note the date and time of the config change.
You can click Edit to change the number of configs listed in the resource.
-
To view changes, click the View Change Report link.
Edit multiple configs
To make changes to multiple devices, select multiple configs before you click Execute Script.