Hello, when I run the remediation commands but the save command will execute after each interface configuration. how can I config the "save command" to run the save command after finish all configuration.
Can you provide the example? It may not be possible based on how the remediation is configured, but it would be better to have a better understanding of the actual script and the triggers indicating that it needs remediation.
Post is kinda vague but what I do is have a weekly job setup that just executes a write memory on all our cisco router and switches. This way if someone forgets to save the config after a change it will be saved once this job runs.You could have a similar job that runs after you run the remediation.
system-view${DisablePromptDetection}${ConfigBlockStartLine}loopback-detection enable bpdu-drop any broadcast-suppression pps 3000 stp edged-port enable port-security max-mac-count 3 port-security port-mode autolearn port-security intrusion-mode disableport arp rate-limit rate 20 drop ip verify source ip-address mac-address port-security mac-address dynamic undo enable log updownquitquitsave force (This command needs to execute after finishing all port one time)${EnablePromptDetection}
I did a daily job of writing memory, but I'm wondering if we can execute any command after finishing the loop for all ports
In a "full" NCM script you can: just put the copy running startup at the end after the looping is completed.
copy running startup
I should note that in my previous company this was not the best practice: we wanted to have whatever scripts execute and then monitor it for a while before we committed it to the startup-config. That way in an emergency, we could just reboot the device and we'd be back to status quo.
Thank your reply. We already test and monitor the configuration.