GWS-012 · Script
Bulk Student Account Creation from SIS
Creates student Google Workspace accounts and OUs from a student information system (SIS) export.
What it does
Works with any SIS that can export a CSV. You tell the script which columns hold the first name, last name, student ID and graduation year, so no reformatting is needed. For each student:
- Builds the email address from your naming pattern (or uses an Email column)
- Builds the OU path from your OU pattern and creates any missing OUs
- Creates the account with the student ID stored as the employee ID
- Uses a password column, or a strong random password
Students whose student ID or email already exists are skipped (safe to run again). Email collisions between different students are reported for you to resolve. 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 | The SIS export file. | required | |
| Domain | Student email domain, for example students.school.org | required | |
| EmailPattern | Tokens: {first} {last} {f} {l} {id} {grad} {grad2}. Default: {first}.{last}{grad2} ({grad2} = last two digits of graduation year). Letters are lowercased and characters other than a-z, 0-9, dot, dash and underscore are removed. | {first}.{last}{grad2} | |
| OuPattern | Tokens as above. Default: /Students/{grad} | /Students/{grad} | |
| FirstNameColumn | Default: FirstName | FirstName | |
| LastNameColumn | Default: LastName | LastName | |
| StudentIdColumn | Default: StudentId | StudentId | |
| GradYearColumn | Default: GradYear | GradYear | |
| EmailColumn | Optional. If this column exists and has a value, it is used instead of EmailPattern. | ||
| StartingPwColumn | Optional. If this column has a value, it is used as the starting password. | ||
| ChangePasswordAtFirstSignIn | Require students to change the password at first sign-in. Off by default because many schools manage student passwords. | False | |
| ExportPasswords | Save new accounts and passwords to a CSV in the Reports folder (for teachers or rostering). Store or delete that file securely after use. | False | |
| GamPath | Path to GAM. Default: gam (on PATH). | gam |
Exit codes
- 0 = Completed, nothing needs attention
- 1 = Completed, but some rows failed or collided
- 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. The log lists each new account. Suspend or delete them with GWS-002 and remove any empty OUs.
Version and change log
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | November 2026 | First release. |