GAM script to pull the list of users with recovery email addresses on a regular / scheduled basis, and then replace them with a manager email address.

309 views
Skip to first unread message

Shivanjali Kaundal

unread,
Aug 31, 2023, 3:24:24 AM8/31/23
to google-ap...@googlegroups.com
The need: to pull the list of users with recovery email addresses on a regular / scheduled basis, and then replace them with a manager email address.

Looking for correct Gam command on windows OS

Thanks,
Shivanjli

This message (and any associated files) may contain confidential and/or privileged information. If you are not the intended recipient or authorized to receive this for the intended recipient, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by sending a reply e-mail and delete this message. Thank you for your cooperation.

Ross Scroggs

unread,
Aug 31, 2023, 9:59:20 AM8/31/23
to google-ap...@googlegroups.com
List users with recovery email
gam config csv_output_row_filter "recoveryEmail:regex:^.+$"  redirect csv ./recovery.csv print users fields recoveryemail

Change a users recovery email
gam update user us...@domain.com recoveryemail man...@domain.com

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/CAMGmkjYV5zz3Rs7Qqw23YwuJQhwy7-e6y72G8Mv%3DnZWWX3YU7g%40mail.gmail.com.

Shivanjali Kaundal

unread,
Aug 31, 2023, 9:15:41 PM8/31/23
to GAM for Google Workspace
Hey Ross,

Thank you for the GAM commands. DO you have any idea or a way to run theses two commands in one go?

Basically, We do not want to run this separately.

Ross Scroggs

unread,
Aug 31, 2023, 9:50:29 PM8/31/23
to google-ap...@googlegroups.com
The will change all recovery emails to man...@domain.com

gam config csv_output_row_filter "recoveryEmail:regex:^.+$" print users fields recoveryemail | gam csv - gam update user "~primaryEmail" recoveryemail man...@domain.com

Ross
----
Ross Scroggs


Shivanjali Kaundal

unread,
Aug 31, 2023, 10:19:22 PM8/31/23
to google-ap...@googlegroups.com
Okay, This will work on the GAM or GAMADV XTD3?

I tried this but it did not work. Can you put an example to this GAM command that is working for you?

Thank YOU

--
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.

Ross Scroggs

unread,
Aug 31, 2023, 10:29:56 PM8/31/23
to google-ap...@googlegroups.com
Send me a Meet/Zoom invitation.

Ross



--

Shivanjali Kaundal

unread,
Aug 31, 2023, 10:34:57 PM8/31/23
to google-ap...@googlegroups.com
Sorry right now I am travelling back to my place. I can't join the Meet.

shivanjli kaundal

unread,
Sep 6, 2023, 6:10:14 AM9/6/23
to GAM for Google Workspace
Thanks you Ross,

It worked

Reply all
Reply to author
Forward
0 new messages