GWS-014 · Script
Chromebook OU Move by Serial Number
Moves Chromebooks into organizational units from a list of serial numbers.
Version 1.0.0Language PowerShellUpdated November 2026
What it does
Reads a CSV of serial numbers with a target OU per row (or one -TargetOrgUnit for all rows). Devices already in the right OU are skipped; serial numbers that are not enrolled are reported. Moves are sent in batches of 50 for speed. Preview mode (default) shows every move 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 moves only (default). Apply = move the devices. | Preview, Apply | Preview |
| InputCsv | CSV with column SerialNumber, and optional TargetOrgUnit. | required | |
| TargetOrgUnit | OU for rows without their own TargetOrgUnit. | ||
| GamPath | Path to GAM. Default: gam (on PATH). | gam |
Exit codes
- 0 = Completed, nothing needs attention
- 1 = Completed, but some serials were not found or failed to move
- 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. Export devices with GWS-007 first, then move them back with a CSV holding the original OUs.
Version and change log
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | November 2026 | First release. |