GAM bulk account suspension CSV

197 views
Skip to first unread message

Henry Cook

unread,
Jan 16, 2024, 7:03:40 AM1/16/24
to GAM for Google Workspace
Hi,

Trying to bulk suspend users through gam using a CSV however not having much luck...

gam csv <File Name>.csv gam update user ~email suspended on

and have tried

gam csv <File Name>.csv gam update user ~user suspended on

any advice or guidance would be appreciated 

Maj Marshall Giguere

unread,
Jan 16, 2024, 9:56:02 AM1/16/24
to google-ap...@googlegroups.com
Henry;

The syntax you show is absolutely correct for advanced gam.  Some questions, what does the csv file look like, what version of gam are you using, regular or advanced and what errors if any were reported.  

For advanced gam your csv file might look like this:
./suspend.csv:
email
...

Then the advanced gam command would be:

$> gam csv ./suspend.csv gam update user ~email suspended on



This email, including any attachments, is confidential and may be privileged. If you are not the intended recipient please notify the sender immediately, and please delete it; you should not copy it or use it for any purpose or disclose its contents to any other person. If the email, including any attachments, is legally privileged, you should not forward it to any other person.

--
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/fa356159-6117-4836-99c8-d5f6da959cfdn%40googlegroups.com.

laurent

unread,
Jan 25, 2024, 10:47:10 PM1/25/24
to GAM for Google Workspace
With GAMADV-XTD3 6.64.11, I get systematically the following error with that command:

% gam csv ./suspend.csv gam update user ~email suspended on

zsh: no such user or named directory: email


my csv file suspend.csv

email

a...@castilleja.org

d...@castilleja.org

My gam:

GAMADV-XTD3 6.64.11 - https://github.com/taers232c/GAMADV-XTD3 - pyinstaller

Ross Scroggs <ross.s...@gmail.com>

Python 3.11.5 64-bit final

MacOS Monterey 12.3 arm64

Path: /Users/xxxx/bin/gamadv-xtd3


Thanks for the help

Maj Marshall Giguere

unread,
Jan 25, 2024, 11:15:47 PM1/25/24
to google-ap...@googlegroups.com
GAM's latest version is 6.67.29, although I don't think that's your problem.  I think the problem is that zsh is trying to expand ~email as a path, try quoting the argument

gam csv ./suspend.csv gam update user "~email" suspended on

laurent

unread,
Jan 25, 2024, 11:18:57 PM1/25/24
to GAM for Google Workspace
yes quoting solved the problem.
Thanks

Ross Scroggs

unread,
Jan 25, 2024, 11:36:27 PM1/25/24
to google-ap...@googlegroups.com
Use quotes, zsh is interpreting ~ as a reference to your home folder

 gam csv ./suspend.csv gam update user "~email" suspended on

Ross
----
Ross Scroggs



laurent nguyen

unread,
Jan 26, 2024, 1:34:15 AM1/26/24
to google-ap...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages