Offboarding Scripts to Share

841 views
Skip to first unread message

Steve - DynTech

unread,
Aug 6, 2018, 8:52:33 AM8/6/18
to GAM for G Suite
I was wondering if anyone out there had an offboarding script based around GAM they would be willing to share?

✉ Kevin Melillo

unread,
Aug 6, 2018, 2:06:17 PM8/6/18
to google-ap...@googlegroups.com
Here is my termUser script.  I keep our entire script repository on GITHUB


We use bash.

On Mon, Aug 6, 2018 at 8:52 AM Steve - DynTech <st...@dyntech.co.uk> wrote:
I was wondering if anyone out there had an offboarding script based around GAM they would be willing to share?

--
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-man...@googlegroups.com.
To post to this group, send email to google-ap...@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/8b9df177-779b-4b1c-ba77-827817b79907%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Kevin Melillo
Electronic Communications Analyst
Information Technology
445 Hoes Lane
Piscataway, NJ 08854

Phone:732-465-6609 | Mobile: 732-609-4331

Steve - DynTech

unread,
Aug 7, 2018, 6:41:57 AM8/7/18
to GAM for G Suite
Kevin - that's great. Really appreciate it.

Looking at that and seeing my gam path is different, one minor adjustment to it could be to set the gam path as a variable then refer to it that way later in each command

GAM=/home/s_larsen/bin/gamadv-xtd/gam

$GAM update user $userEmail suspended off

I've started to make one here but it's not tested as working nor complete yet.


On Monday, 6 August 2018 19:06:17 UTC+1, k.melillo wrote:
Here is my termUser script.  I keep our entire script repository on GITHUB


We use bash.

On Mon, Aug 6, 2018 at 8:52 AM Steve - DynTech <st...@dyntech.co.uk> wrote:
I was wondering if anyone out there had an offboarding script based around GAM they would be willing to share?

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

✉ Kevin Melillo

unread,
Aug 7, 2018, 9:00:57 AM8/7/18
to google-ap...@googlegroups.com
The GAM path is set, and from the command-line it works like a charm from anywhere...  but from my scripts, it does not seem to run without the full path... 

On Tue, Aug 7, 2018 at 6:42 AM Steve - DynTech <st...@dyntech.co.uk> wrote:
Kevin - that's great. Really appreciate it.

Looking at that and seeing my gam path is different, one minor adjustment to it could be to set the gam path as a variable then refer to it that way later in each command

GAM=/home/s_larsen/bin/gamadv-xtd/gam

$GAM update user $userEmail suspended off

I've started to make one here but it's not tested as working nor complete yet.


On Monday, 6 August 2018 19:06:17 UTC+1, k.melillo wrote:
Here is my termUser script.  I keep our entire script repository on GITHUB


We use bash.

On Mon, Aug 6, 2018 at 8:52 AM Steve - DynTech <st...@dyntech.co.uk> wrote:
I was wondering if anyone out there had an offboarding script based around GAM they would be willing to share?

--
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-man...@googlegroups.com.


--
Kevin Melillo
Electronic Communications Analyst
Information Technology
445 Hoes Lane
Piscataway, NJ 08854

Phone:732-465-6609 | Mobile: 732-609-4331

--
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-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

For more options, visit https://groups.google.com/d/optout.

Ross Scroggs

unread,
Aug 7, 2018, 9:06:43 AM8/7/18
to google-ap...@googlegroups.com
Kevin,

Yes, you need the full path, but Steve's point is that if you do this (substituting with your Gam path):
GAM=/home/s_larsen/bin/gamadv-xtd/gam

$GAM update user $userEmail suspended off
Then, if the path changes, you (or someone that downloads your scripts) only has to change it in one place in the script, not on every line where gam is run.

Ross

✉ Kevin Melillo

unread,
Aug 7, 2018, 9:12:05 AM8/7/18
to google-ap...@googlegroups.com
Ah, so adding the path within the script...  got it.


For more options, visit https://groups.google.com/d/optout.

El dee

unread,
Jun 6, 2020, 10:07:08 AM6/6/20
to GAM for G Suite
Hello 

I know this post is super old so apologies

I'm new to bash and G Suite and struggling with what to put here

GAM=/home/s_larsen/bin/gamadv-xtd/gam
GAMFILEPATH
=~/gam-data

My Gam path in explorer is e:\gam and i am using gitbash on Windows 10

Sorry 



On Monday, 6 August 2018 14:52:33 UTC+2, Steve Larsen wrote:
I was wondering if anyone out there had an offboarding script based around GAM they would be willing to share?

Reply all
Reply to author
Forward
0 new messages