Removing forwarding & delegates from a list of accounts (csv)

1,279 views
Skip to first unread message

Kieran Brophy

unread,
Feb 1, 2017, 10:58:30 AM2/1/17
to GAM for G Suite
Hi All

Thanks in advance for taking the time to look at this.

I need to remove all delegates, forwarding addresses and reset password for a number of accounts.

We will be archiving the accounts in an OU which has both of the above turned off, will the OU remove the settings or simply disable/hide them?

If the OU won't remove the settings could you please advise which GAM commands would be required? 

I hope I have been clear in explaining my requirements.

Many Thanks

Kieran


****************************************************
Think Green!!! Please don't print this e-mail unless you really need to.
****************************************************
This e-mail contains proprietary information some or all of which may be legally privileged. It is for the intended recipient only. If an addressing or transmission error has misdirected this e-mail, please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail. Whilst reasonable precautions have been taken to ensure that this message and any attachments are free from viruses or other malicious code, no guarantee is implied or given. The views expressed in this communication may not necessarily be the views held by National Express Group PLC.

National Express Group PLC. Registered in England No 2590560. Registered Office: National Express House, Birmingham Coach Station, Mill Lane, Digbeth, Birmingham B5 6DD

Ross Scroggs

unread,
Feb 1, 2017, 12:30:06 PM2/1/17
to google-ap...@googlegroups.com
Kieran,

Make a CSV file Users.csv containing the addresses of the users you are archiving.
User
...

Get their delegations and delete them:
gam csvfile Users.csv:User print delegates > delegates.csv
gam csv delegates.csv gam user "~User" delete delegate "~delegateAddress"

Turn off forwarding:
gam csv Users.csv gam user "~User" forward off

Get their forwarding addresses and delete them:
gam csvfile Users.csv:User print forwardingaddresses > forwarding.csv
gam csv forwarding.csv gam user "~User" delete forwardingaddress "~forwardingEmail"

Move to archive OU and reset password:
gam csv Users.csv gam update user "~User" org "/ArchiveOU" password "keep out"

Test on a small sample and proceed when results match your expectations.

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-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@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/1e8668d9-3478-43f8-9023-a27102cb0818%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages