Moving suspended users drive file contents into a team drive

183 views
Skip to first unread message

Rance Hall

unread,
May 7, 2019, 10:38:04 AM5/7/19
to google-ap...@googlegroups.com
Using the instructions here: https://github.com/taers232c/GAMADV-XTD/wiki/Users-Drive-Files#update-files

And v. 4.82.02

I' trying to do this:

gam <UserTypeEntity> update drivefile <DriveFileEntity> [copy] [retainname | (newfilename <DriveFileName>)] <DriveFileUpdateAttribute>*

Here is my issue:

Command: gam update >>>drivefile<<< drivefileid 1VrTMq_lHsa2DA67PQiJO66HMh-0_wlxyEqqVEhlj0Wg teamdriveparent HAL

ERROR: Invalid argument: Expected <alias|building|contact|contactphoto|course|courses|cros|customer|domain|drivefileacl|feature|group|mobile|org|orgs|printer|project|resoldcustomer|resoldsubscription|resource|resources|schema|site|siteacl|teamdrive|user|users|vaulthold|vaultmatter|verify>
Help: Syntax in file /Users/rance.hall/bin/gamadv-xtd/GamCommands.txt
Help: Documentation is at https://github.com/taers232c/GAMADV-XTD/wiki


I *THINK* this is telling me that the drivefile keyword is not allowed in this location despite the manual saying it is supposed to be there.

I created a teamdrive like this: gam user <userA> create teamdrive <teamdrivename>

I have a csv of a subset of userB's files

So what Im hoping to accomplish is something like:

gam csv <path to file list.csv> gam update drivefile drivefileid ~id teamdriveparent <teamdriveid>

Questions:
do I need to specify a user in the update call, and does that user need to be a contributor to the team drive first?

And what is with the error message telling me my syntax is off, is it really off?

--
Rance Hall
ESU 10 Application Specialist
O: 308-698-1919
F: 308-233-9066

Ross Scroggs

unread,
May 7, 2019, 10:44:09 AM5/7/19
to google-ap...@googlegroups.com
Rance,

You've left the <UserTypeEntity> out.
gam <Specify some user here> update drivefile drivefileid 1VrTMq_lHsa2DA67PQiJO66HMh-0_wlxyEqqVEhlj0Wg teamdriveparent HAL

gam csv <path to file list.csv> gam user userA update drivefile drivefileid ~id teamdriveparent <teamdriveid>

Ross

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/5C88F5EE-7A61-4130-A1D0-B44DB9B6EB36%40esu10.org.
For more options, visit https://groups.google.com/d/optout.


--

Rance Hall

unread,
May 7, 2019, 11:16:32 AM5/7/19
to google-ap...@googlegroups.com

Second question, same problem:

 

After adding a user to my gam command I’m still failing but in a different way:

 

Currently I have: gam csv <csv_file.csv> gam user <userA> update drivefile drivefileid ~id teamdriveparent <teamdrivename>

 

Once the id from the csv file gets inserted into gam, I get an error message with the id value highlighted in the >>><<< pointers and the error message is “Invalid argument”

 

The id numbers used are a result of a earlier gam query that went like this:

 

gam user <userA> print filelist id name

 

I assume these are the correct IDs needed to be fed into the above…

 

I’m only working till lunch today because of a medical appt, and I think I will hit a record in my daily stupid mistakes counter for the day.

 

Rance

-- 

Rance Hall

ESU 10 Application Specialist

O: 308-698-1919

F: 308-233-9066

 

Ross Scroggs

unread,
May 7, 2019, 11:20:58 AM5/7/19
to google-ap...@googlegroups.com
Rance,

Drop drivefileid.
gam csv <csv_file.csv> gam user <userA> update drivefile ~id teamdriveparent <teamdrivename>

Ross




For more options, visit https://groups.google.com/d/optout.


--

Rance Hall

unread,
May 7, 2019, 12:07:55 PM5/7/19
to google-ap...@googlegroups.com

UserA wants access to userBs stuff and userB is a suspended account belonging to an employee who left a year ago.

 

Why a year passed without anybody missing anything, I have no idea.

 

A subset of userBs stuff is indentified and targeted.

 

Created a team drive with UserA as organizer.

 

Enrolled userB as member of teamdrive.

 

Unsuspended the user so that they could access the teamdrive.

 

Updated the subset of files to show the teamdrive as their parent.

 

Resuspended userB.

 

Did not remove suspended users access to team drive on the off chance I need to copy something else tomorrow.

 

Thanked Ross profusely for substituting for coffee this morning.

 

Job done.

 

 

Thanks Ross, profusely even.

Reply all
Reply to author
Forward
0 new messages