Un-enroll multiple devices via script?

CR
Chris R.
SkyBitz - End User

This Friday I'll have a situation where a large set of devices will need to be un-enrolled.  Is there a certain script for the un-enroll process for which I could run to run on an entire folder group instead of having to do each one individually?  I couldn't find anything in the script cmd doc but wanted to confirm.

Thanks

7 years ago
Android
ANSWERS
MD
Matt Dermody Diamond Contributor
7 years ago

What version are you on? I'm pretty sure you can select multiple devices in a folder an unenroll them simultaneously without having to script it:

CR
Chris R.
7 years ago

We are on version 13.4.0.4167.  There is not an option to select multiple devices and when I try to select the folder, the un-enroll option is not there.

AA
Anton Apanasenko
7 years ago

If it is Android devices that need to be mass un-enrolled, you can try <uninstall_agent> script.

That command removes MobiControl agent application from target device(s) and gracefully removes previously applied policies. 

CR
Chris R.
7 years ago

I believe I read that only worked for non-ELM agents.  Any thoughts on that?

AA
Anton Apanasenko
7 years ago

As far as I am aware, <uninstall_agent> script should work for all Android+ agents:

http://www.soti.net/mc/help/v13/en/default.htm#ScriptCmdSet.htm?Highlight=scripts

CR
Chris R.
7 years ago

We are using Samsung TabE devices and this is the part I was referring to:

The uninstall_agent command cannot uninstall a Samsung ELM agent due to permission limitations.

RC
Raymond Chan Diamond Contributor
7 years ago

Hi Chris,

On v13.4, your only option left is probably to use RESTful API's to find the deviceID of each device of interest and unroll with

  POST  /api/devices/{deviceId)/actions