How to use CSV files with GAM?

2,218 views
Skip to first unread message

Alex Peacock

unread,
Mar 30, 2022, 6:48:23 AM3/30/22
to GAM for Google Workspace
Hi folks,

I'm trying to mass de-provision Chromebooks via a CSV file with all the serial numbers in.
However the command cannot find my csv file, even tho I have placed it in GAMWORK folder. 

gam cbs.csv gam update cros cros_sn "~sn" action deprovision_retiring_device

Where do I need to place the csv file for GAM to find it?

Cheers
Alex

Ferdows Sanehi

unread,
Mar 30, 2022, 7:14:52 AM3/30/22
to GAM for Google Workspace
Hi Alex, 

If you are looking for a simplified version of this you can use GAT+. GAT+ puts a face on GAM. 
You can import serial numbers and make a bulk modification from within a Google Spreadsheet then allow you to preview changes before accepting. 

Thanks,
Ferdows

Dave Spence

unread,
Mar 30, 2022, 10:31:38 AM3/30/22
to google-ap...@googlegroups.com
I normally either provide the full path to the csv in double quotes or place it in the directory I am currently in. I also have the gam exe in my system path so I can call it from anywhere. Windows 11.

--
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/b2aeb5c5-ca71-4aed-a7a1-56c0bb53cfd8n%40googlegroups.com.

All e-mail correspondence to and from this address is subject to the
North Carolina Public Records Law, which may result in monitoring and
disclosure to third parties, including law enforcement.

                

            Visit the BCS homepage!

Ross Scroggs

unread,
Mar 30, 2022, 10:56:01 AM3/30/22
to google-ap...@googlegroups.com
Alex,

Your command will work if you are in the same folder as cbs.csv, other wise you have to give the path to the file.

Maj Marshall Giguere

unread,
Mar 30, 2022, 2:24:12 PM3/30/22
to google-ap...@googlegroups.com
https://github.com/taers232c/GAMADV-XTD3/wiki/Bulk-Processing#csv-files
--
Maj Marshall E Giguere
NH Wing Director of IT
Civil Air Patrol, U.S. Air Force Auxiliary




Volunteers serving America's communities, saving lives, and shaping futures.


Lara Admin

unread,
Mar 31, 2022, 11:45:25 AM3/31/22
to GAM for Google Workspace
This is how my command looks:

/Users/lara/bin/gam/gam csv /Users/lara/Desktop/deprovision_1.csv gam update cros ~serial action deprovision_same_model_replace acknowledge_device_touch_requirement  

**Must have query:id: before serial number in csv***

Ross Scroggs

unread,
Mar 31, 2022, 11:50:14 AM3/31/22
to google-ap...@googlegroups.com
Lara,

You want:
/Users/lara/bin/gam/gam csv /Users/lara/Desktop/deprovision_1.csv gam update cros cros_sn ~serial action deprovision_same_model_replace acknowledge_device_touch_requirement
or 
/Users/lara/bin/gam/gam csv /Users/lara/Desktop/deprovision_1.csv gam update cros query "id:~~serial~~" action deprovision_same_model_replace acknowledge_device_touch_requirement  

Do not do this: **Must have query:id: before serial number in csv***
Just have the serial number in the CSV file.

Ross

Lara Admin

unread,
Mar 31, 2022, 11:51:15 AM3/31/22
to GAM for Google Workspace
Thanks Ross!!!
Reply all
Reply to author
Forward
0 new messages