Mass Exclude One smart group from Policies

sharriston
Contributor III

We are starting a byod laptop program at school this year and basically what I want to do is exclude the BYOD smart group from all policies (then I will add them to the network and printing polices). I know there should be a way to do this with the API, but when I use the PUT command it removes all other exclusions except for the one I added via the API. Basically I was wondering if anyone had figured this out? I'm assuming something along the lines of use API to download xml file then script adding the exclusion group to the front of the exclusion list. Any help would be appreciated.

3 REPLIES 3

brianj
New Contributor

Try appending your new exclusion to the exclusions you currently have and then PUT all of the exclusions XML back via the API.

sharriston
Contributor III

Thats what I figured but how could I do that in bulk?

brianj
New Contributor

I've done it using Python to iterate through all the policies, append the XML, and then PUT the XML for the policy back.