GAM assistance please

ddelboccio
Contributor III

Hello all!

Can anyone refresh me on the proper GAM command line syntax for suspending (or deleting) user accounts using a CSV file of email addresses as the source?

Many thanks!

2 ACCEPTED SOLUTIONS

SteveHarmon
Contributor

From CSV:

gam csv <File Name>.csv gam delete user ~email

From a Google Sheet:

gam csv gsheet <GSheet Owner Email Address> <File ID> <Tab Name> gam delete user ~email

 

View solution in original post

An example would be

 

gam update user ~primaryEmail suspended on

 

 

--
CISSP | LinkedIn | @Phyxiis

View solution in original post

12 REPLIES 12

icrew
Contributor II

You might want to post this over on the GAM mailing list: folks there know a ton about GAM and are unfailingly helpful..... https://groups.google.com/g/google-apps-manager/

SteveHarmon
Contributor

From CSV:

gam csv <File Name>.csv gam delete user ~email

From a Google Sheet:

gam csv gsheet <GSheet Owner Email Address> <File ID> <Tab Name> gam delete user ~email

 

Steve, is there a GAM command to "suspend" instead of delete?

An example would be

 

gam update user ~primaryEmail suspended on

 

 

--
CISSP | LinkedIn | @Phyxiis

You might also want to add "signout" also to the end, though I'm not sure if it'll work based on the type of command 

--
CISSP | LinkedIn | @Phyxiis

Replace "delete" with "suspend"

To unsuspend, replace delete with "unsuspend"

Steve, that didnt work, but this additional answer/option does:

gam update user ~primaryEmail suspended on

Are you by chance using GAM? I rely on GAMADV-XTD3 for the added functionality, but there are times that commands can differ just slightly. Glad to hear that the other command worked!

Yes. People should definitely be using GAMADV-XTD3 for the multitude of extra features.

--
https://wheretofind.me/@NoSubstitute

YERKO
Contributor

saludos @ddelboccio según investigué: Mediante un archivo CSV lo que si puedes hacer es mover todos los usuarios que quieres dar de baja a una misma Unidad Organizativa (UO) y luego ahí los seleccionas y los das de baja desde la consola.

espero eso te ayude.

éxito!

YERKO
Contributor

aqui encontre otra opción pero para hacer desde hoja de calculos de google y con una aplicación/ plugin que hay que instalar, la verdad no se que tan efectivo sea.

https://workspace.google.com/marketplace/app/ok_goldy/939946549872

 

A Marketplace addon makes it easier, but GAMADV-XTD3 is a tool all superadmins should learn how to use.

You will not regret it.

--
https://wheretofind.me/@NoSubstitute