07-20-2016 07:54 AM
Can someone show me how to compile a script that will delete a number of configurations. For example, I would like to delete the following configurations shown in the image. However, it will take a long time to issue the command delete ... for all the lines shown. Alternatively, is there one delete command that will delete all configurations? (I don't want to do a factory reset).
07-26-2016 11:07 AM
You would need to right click on it and open it into something like notepad or wordpad on a windows machine, or really any basic text editor such as sublime. Once their you can delete out anything that you don't want (for example anything between <security> and </security> would delete out your security policies)
07-22-2016 04:23 AM
Any thoughts on this question?
07-22-2016 07:05 AM
I'm a little lost on what you are looking to do I guess. It sounds like you would like to delete all of the actual configuration changes on your device, much akin to what a factory reset would do; however you don't want to do an actual factory reset because of something correct?
Unless my view of scripting for the Palo Alto is way out of line, which it very well could actually be, I don't think there is a way to do this effectively without typing out everything once anyways. Your screenshot displays everything you could actually delete with the delete command, so unless you forgot to include another screenshot then it doesn't give anybody much insight to what you actually want to do besides the fact that you want to delete all of the configuration off of the device, but don't want to actually reset the device. If you give us the reason why you don't want to reset the device we may be able to help a little more.
07-24-2016 03:42 AM
Thanks for responding. You have pretty much got it - I want wipe the entire configs on the PA VM but I don't want to do a factory reset because it would mean me wiping the license on the VM.
Is there a way of achieving this?
07-25-2016 03:12 PM
maybe this is too simple. but you could download the config. used a text editor to remove everything you didn't want and then re-upload the config. once you apply it you will get errors if you missed something.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!