Mass-add new Network Segment to all policies

lbmoll
New Contributor II

Hey nation!

We have around ~150 policies in our environment, all limited to Network Segments. The company just recently opened up a new office and therefore we created a new network segment for that office.

Now, we'd like to add this new network segment to all of our policies but it seems kind of tedious to do this manually. Is there a way to automate this process?

1 REPLY 1

bofh
New Contributor III

If you have a clear selector like "if Policy Name like 'Install%' " etc. use the API with the scripting language of your choice. The easiest way for me to accomplish this, was/is using PHP GuzzleHTTP.
But even ShellScripts
curl will do that job.

The unsupported way would be to write an sql statement which does this.