Managing Google Workspace for hundreds of users across multiple locations meant constant group membership changes, user suspensions, and license shuffling. Doing this through the admin console one at a time was not realistic.
These scripts use GAM (Google Apps Manager) to automate bulk operations in Google Workspace.
- Bulk Create Groups.ps1 - Creates Google Groups in bulk from a CSV input using GAM.
- Bulk Clear Groups.py - Removes all members from specified Google Groups.
- Delete_All_Group_Members.ps1 - PowerShell variant for clearing group memberships.
- Archive Users.py - Archives departed users: transfers Drive data, suspends the account, and updates licenses.
- Export Users.py - Exports all Google Workspace users to CSV via GAM.
- GAM_Extract_Users.ps1 - PowerShell wrapper to extract user data through GAM.
- Google Suspend Users.py - Bulk-suspends users from a CSV list.
- Bulk Extract Members for Bulk Upload.py - Extracts group membership data and formats it for re-import.
- Delete_All_Group_Members.sh - Bash version of the group membership cleanup for macOS environments.
# Create groups from CSV
.\windows\Bulk Create Groups.ps1
# Suspend users in bulk
python .\windows\Google Suspend Users.py
# Archive a departed user
python .\windows\Archive Users.py- GAM installed and authorized for your Google Workspace domain
- Python 3.x for
.pyscripts - PowerShell 5.1+ for
.ps1scripts - Google Workspace admin credentials configured in GAM