A PowerShell launcher for common Google Workspace administration tasks driven by GAM. Designed around offboarding-style operations: archiving a user's mailbox into a group, moving their Drive content into a Shared Drive, transferring their calendars and event-organizer rights to another account, and managing mailbox delegation.
The launcher exposes a numbered menu. Each item validates the admin account, the source mailbox, and (where applicable) the target before running its GAM command.
- Copy mailbox messages to a group — archives every message from a user mailbox into a Google Group's archive.
gam user <source> archive messages <targetGroup> max_to_archive 0 doit - Move Drive content to a new Shared Drive — creates a fresh Shared Drive named
Migrated from <source> - <datetime>and moves the source user's My Drive content into it.gam user <admin> create teamdrive "Migrated from <source> - <datetime>" gam user <admin> add drivefileacl <sdid> user <source> role organizer gam user <source> move drivefile root teamdriveparentid <sdid> mergewithparent - Transfer calendars to another account — reassigns secondary calendars and, for the primary calendar (which Google won't let you transfer), reassigns the organizer of all future events to the target user. After this runs, the target user can cancel those events and Google will send proper cancellation notices to invitees, even if the source user is later deleted.
gam user <source> transfer calendars <target> gam user <source> update event <eventid> calendar primary newowner <target> - List / add / remove mailbox delegation — manage who has delegated access to a mailbox.
gam user <source> show delegates gam user <source> add delegates <delegate> gam user <source> del delegates <delegate> - Change GAM project — re-select which GAM multi-project profile to use.
- Exit script.
Set variables at the top of gwadmin.ps1 if your install differs from the defaults:
$GAMpath = "C:\GAM7"
$gamsettings = "$env:USERPROFILE\.gam"
$destinationpath = (New-Object -ComObject Shell.Application).NameSpace('shell:Downloads').Self.Path
$GAMpath — the GAM application folder.
$gamsettings — the GAM multi-project settings folder.
$destinationpath — where any local output ends up (currently used only for temp files).
Check testing-guideline.md as a suggested testing checklist.
- Download the latest release and extract it locally (releases).
- Adjust the variables in
gwadmin.ps1if needed. - Run
gwadmin.ps1from PowerShell (right-click → Run with PowerShell, orpowershell -ExecutionPolicy Bypass -File .\gwadmin.ps1). - Pick a GAM project, then choose a menu option and follow the prompts.
If PowerShell blocks the script with "Running scripts is disabled on this system", see POWERSHELL_ISSUE.md.
- Windows 10+ or Windows Server 2019+
- GAM installed and configured for multi-project use
- PowerShell 5.1 or later
- For personal support and queries, please submit a new issue to have it addressed.
- For commercial related questions, please contact me for consulting costs.
| 🩷 Project support |
|---|
| If you found this project helpful, consider buying me a coffee |
| Thanks for your support, it is much appreciated! |