Command 1 - Create Drive and Assign Internal User
gam redirect csv ./SharedDrivesCreated.csv multiprocess csv SharedDriveNames.csv gam user "~User" create shareddrive "~Name" csv addcsvdata primaryEmail "~primaryEmail"
Command 2 - Share Newly Created drive with External User
gam redirect stdout ./SharedDrivesAccess.csv multiprocess redirect stderr stdout csv SharedDrivesCreated.csv gam add drivefileacl "~id" user "~primaryEmail" role organizer
Command 3 - Copy User MyDrive content to Dedicated Share Drive
gam redirect stdout ./files-copied.csv redirect stderr ./files-error.csv csv ./SharedDrivesCreated.csv gam user "~primaryEmail" copy drivefile root teamdriveparentid "~id" mergewithparent true recursive
--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-manager/8bdabc0d-f551-427f-aee3-ce9c9a4c1f3bn%40googlegroups.com.
Command 3 - Get top level MyDrive items for users
gam redirect csv ./TopLevelMyDriveItems.csv multiprocess redirect stderr - multiprocess csv ./SharedDrivesCreated.csv gam user "~primaryEmail" print filelist query "'root' in parents" fields id,name,mimetype addcsvdata SharedDriveId "~id"
Command 4 - Copy User MyDrive content to Dedicated Share Drive
gam redirect stdout ./files-copied.txt multiprocess redirect stderr ./files-error.txt multiprocess csv ./TopLevelMyDriveItems.csv gam user "~Owner" copy drivefile "~id" teamdriveparentid "~SharedDriveId" recursive
On Dec 5, 2025, at 11:00 AM, 'Zachary DiFonzo' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:
To view this discussion visit https://groups.google.com/d/msgid/google-apps-manager/FF1D9096-7D5C-4A2D-BAE2-0FE7AEB23633%40gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-manager/CAO06pqTnvLRUcLQQVxK53F6-hFceBqm%3DoWJsAc9DRbGzd7uBFQ%40mail.gmail.com.