A good way adding new users or groups to a P8 object store is the use of the security wizard. The wizard will add the users or groups to all necessary objects. But in some cases you want to remove user or groups in a bulk operation from the object store. I attached a modified JAVA script which you can use in combination with the role JSON provided by the object stores security wizard.
Use the UpdateOSSecurity.json provided by the object store.
The wizard process all the items and folders in the object store and remove the selected group or users from the content.
And the wizard removed the group from the object store itself.