Scripting help for scoping/descoping a smart group - Mobile Devices (iPad)

Deverall
New Contributor II

I am in need of some help with a script(s) that utilizes the API. What I am looking for is a way to add a smart group to the exclusion scope of a configuration profile and also to remove a smart group from an exclusion scope of a configuration profile.

Essentially what this boils down to is I have a bash script that clears all pending/failed commands, then clears pass code, then requests a specific version of iOS. It targets a smart group, places them into an array, then loops through. Even with this, I get very minimal results ( I know devices have to be above 50% power, plugged in, connected to wifi, give a blood sample, etc., etc. :)) with this and I think it may have to do with deferrals I have in place. Some devices even with deferral in place will process the update, others say "running the latest software update allowed by your administrator" even though their deferral is set to the contrary and shows older version of iOS it's actually allowed to see. I have a feeling the deferral policies really account for more devices not being able to update, even when "forced" by the script.

So what I want to try and do in testing is add to the script to add the smart group to the exclusion scope of the configuration profile which sets the deferral, then runs through my commands. Then I can run another script afterwards to remove the smart group from the exclusion scope of the config profile and see if this method makes a difference. I will provide my existing script if needed.

0 REPLIES 0