GWS-011 · Script
User Onboarding Automation
Creates new Google Workspace accounts, adds them to groups, and emails the starting sign-in details.
What it does
For each new hire in the CSV: creates the account in the right OU with a strong random starting password (must be changed at first sign-in), sets title and department, adds the user to the listed groups, and emails the sign-in details to the address in NotifyEmail (for example the person's personal email or their manager). Existing accounts are skipped, so the script is safe to run again. Passwords are never written to the log. Preview mode (default) shows every change without making it.
Requirements
GAM7, installed and authorized by you. GAM is not included. Windows PowerShell 5.1 or PowerShell 7.
How to run it
- Run from: an admin workstation or scheduled task with GAM7 set up
- This is an admin script for your Google Workspace tenant, not a per-device endpoint script
- User interaction: none with app-only sign-in
- Schedule: run on demand, or weekly for reports
Settings
| Name | What it does | Options | Default |
|---|---|---|---|
| Mode | Preview = show changes only (default). Apply = make the changes. | Preview, Apply | Preview |
| InputCsv | CSV with columns: Email, FirstName, LastName, OrgUnitPath, and optional Groups (separated by semicolons), NotifyEmail, Title, Department. | required | |
| NotifySubject | Subject for the welcome email. Default: Your new account at #domain# | Your new account at #domain# | |
| GamPath | Path to GAM. Default: gam (on PATH). | gam |
Exit codes
- 0 = Completed, nothing needs attention
- 1 = Completed, but some rows or steps failed
- 2 = Script error (see log)
Testing steps
- Run it first with the mode set to Preview on one test account or small group. Nothing is changed in that mode.
- Read the log and confirm the planned changes are what you expect.
- Run your chosen settings on the same test target and confirm the result.
- Check the exit code: 0 = OK, 1 = needs attention, 2 = error (see log), 9 = this copy is past its Valid until date.
- Roll out to a small group next, then everyone.
Rollback steps
Preview mode changes nothing. New accounts can be suspended or deleted with GWS-002 and removed from groups with GWS-003.
Version and change log
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | November 2026 | First release. |