Migrate nested shared folder to Share Drive

61 views
Skip to first unread message

Will Sultzer

unread,
Apr 1, 2024, 11:10:53 AM4/1/24
to GAM for Google Workspace
Good Afternoon,

I've been using the following function to add a user to a Shared Drive and then transfer the contents of their MyDrive into the Shared Drive while preserving the structure of the drive.

The current issue with the way I'm doing this however is that, if there are any files within the MyDrive that are shared but not owned by $account they are not moved and left on the drive. 

Is there an easy way to adjust for this and move files not owned by $account while also preserving the structure and file sharing permissions of the Shared Folder? I'm looking to move multiple nested shares that exist within user's MyDrive folders into departmental Shared Drives

Reference Function:

function GAM-MyDriveToSharedDrive{
  param(
    [Parameter(Mandatory=$true)]
    $account,
    [Parameter(Mandatory=$true)]
    $DriveID
  )

  gam add drivefileacl $driveid user $acc...@domain.com role manager
  gam user $account move drivefile root teamdriveparentid $driveid mergewithparent true
}

Ross Scroggs

unread,
Apr 1, 2024, 11:42:21 AM4/1/24
to google-ap...@googlegroups.com
Will,

Send a Meet/Zoom invitation to discuss the issues.

Ross
----
Ross Scroggs



--
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 on the web visit https://groups.google.com/d/msgid/google-apps-manager/02f1cb8b-123c-461f-a033-391a9f25aad8n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages