Hi Everyone,
I've been working on a script, in Powershell, to create what we call a support area using the API. I know you're probably wondering why I'm using powershell so I will get that out of the way. Long story short, we are working on a Powershell script to automate the creation of various resources across several different systems. This includes Active Directory OUs, AD security groups, SCCM resources, etc. Jamf is just one part. The thought is to be able to specify what we want these resources named then let Powershell do the rest. We're using a web interface into our Powershell server so this could potentially do this from a webpage. We also use sites very heavily for organization of our Jamf resources. I've got most everything working properly except for one thing. We have a number of default policies that run on all our computers. A good example is enabling the Firewall. We have a subset of machines that have different firewall requirements and cannot use the built in Apple firewall, so one of the things that I do is create an exclusion group in each site so that our desktop support staff can exclude the machines that need to have the builtin firewall turned off so they can use a different firewall. That's just one example, but it's about the best one that I could use to illustrate what I'm trying to accomplish. So after I create the group in the site, I am attempting to add this group to the exclusion section of the policy scope. I'm running into an issue where I am getting a conflict (To rule out any Powershell strangeness, I used curl. The result is the same):
If I take a looks at the Policy Scope on the JSS the group is not in scope:
However, if I take a look at the API it is listed:
I think I'm missing something in my XML, but am not sure what. I think it has something to do with the fact that the policy I'm modifying is in what I call the central site, or no site, and the group is under the new site I just created earlier in the script. Wanted to see if anyone else is using the API to do this kind of work and see if they have any sage advice. Thanks in advance!
Andy