How would one efficiently (i.e., automatically/in bulk) remove all users from a SharePoint site? This would include:
Removing all users from Groups that have access rights within the site
Removing all users who have been granted permissions directly to a site resource (file, item...)
Deleting all outstanding Sharing Invitations
We are hoping to archive sites by keeping them in place with only administrative access (Global Admin or Collection Admin). We need to archive a select number of sites within a collection, while keeping others in production. So this request is specific to a site within a collection, and not collections.