GAM Installation on Windows 11

545 views
Skip to first unread message

Ieisha Doyle

unread,
May 29, 2025, 11:48:10 AMMay 29
to GAM for Google Workspace
Hi there,

Hope you're well.

I'm having some trouble configuring GAM (version 7) to link with our workspace, specifically with setting up the configuration directory as outlined in the GitHub guide https://github.com/GAM-team/GAM/wiki/How-to-Install-GAM7#set-a-configuration-directory-1 

I've successfully installed GAM7, but the subsequent steps are proving a bit confusing. Any assistance would be greatly appreciated.

Kind Regards,

Ieisha

Jay Lee

unread,
May 29, 2025, 11:49:52 AMMay 29
to google-ap...@googlegroups.com
What step did you get to?

What did you try?

What error or message did you get stuck on?

Jay Lee

--
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 visit https://groups.google.com/d/msgid/google-apps-manager/5128caad-1e2d-4c7f-b4ae-4aba6941a8d0n%40googlegroups.com.

Ieisha Doyle

unread,
May 29, 2025, 12:09:09 PMMay 29
to google-ap...@googlegroups.com
Hi Jay,

Thanks for getting back to me.

I've successfully installed GAM, but I'm now a bit confused about setting up the directories. Could you clarify whether I should create the configuration directory within my user profile or directly on the local drive?

Kind Regards,

  Ieisha Doyle

  IT Engineer

  Teams: ieisha...@smg-team.com
  A60 Great Portland St, London, W1W 7RT

  W: smg.team

  Follow us on LinkedIn



Aston Wooller

unread,
May 29, 2025, 10:46:43 PMMay 29
to GAM for Google Workspace
Hey Leisha

I prefer setting up GAM and its child folders in a single parent folder. So something like C:\GAM\GAM (which has the gam.exe in it), C:\GAM\GAMWork (where files from GAM are downloaded to) and C:\GAM\GAMConfig (where gam.cfg, GAMCache folder, and oauth files are kept).

There are a few reasons why I like it this way: 
  • If I wanted to set up a service account to run scheduled scripts, it can access the installation in the same place instead of it having a separate configuration of GAM. 
  • I can put all my other GAM related files in the same folder, like Powershell scripts I put in C:\GAM\Scripts and any CSV outputs from GAM I usually point it to C:\GAM\Reports; they're all nice and tidy and found in one place.
  • This makes copying my installation, including my scripts, to another machine much easier: just copy and paste the parent folder and then set the GAMCFGDIR environment variable.
  • I also put the other app Jay made, Got Your Back, in the same folder C:\GAM\GYB.
The main thing is that in order for gam.exe to find the config directory, you need to set the GAMCFGDIR environment variable in Windows to wherever you put GAMConfig\gam.cfg file. Then in the gam.cfg you set the variables to point it to the other folders
cache_dir = C:\GAM\GAMConfig\GAMCache
config_dir = C:\GAM\GAMConfig
drive_dir =  C:\GAM\GAMWork

But it will work wherever you decide to put the files. Where you put it is just personal preference.

Cheers
Aston

Aston Wooller

unread,
May 29, 2025, 10:47:28 PMMay 29
to GAM for Google Workspace
Sorry, I'm an idiot; I just automatically typed Leisha instead of Ieisha.

Ieisha Doyle

unread,
May 30, 2025, 9:23:27 AMMay 30
to google-ap...@googlegroups.com
Hi Aston,

Thanks so much for this. I have now setup the following directories as you mentioned above:

C:\GAM\GAMConfig\GAMCache
C:\GAM\GAM 
C:\GAM\GAMConfig
C:\GAM\GAMWork

Could you advise on how to configure GAM with our Google admin console? My goal is to pull Google Groups data, including permissions and owners, which I can't seem to access directly through the Admin console.

Kind Regards,


  Ieisha Doyle

  IT Engineer

  Teams: ieisha...@smg-team.com
  A60 Great Portland St, London, W1W 7RT

  W: smg.team

  Follow us on LinkedIn


The information contained in this e-mail message and any accompanying files is or may be confidential. If you are not the intended recipient, any use, dissemination, reliance, forwarding, printing or copying of this e-mail or any attached files is unauthorised. This e-mail is subject to copyright. No part of it should be reproduced, adapted or communicated without the written consent of the copyright owner. If you have received this e-mail in error please advise the sender immediately by return e-mail or telephone and delete all copies. Stuff Limited does not guarantee the accuracy or completeness of any information contained in this e-mail or attached files. Internet communications are not secure, therefore Stuff Limited does not accept legal responsibility for the contents of this message or attached files.

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

Aston Wooller

unread,
Jun 2, 2025, 5:54:12 PMJun 2
to GAM for Google Workspace
Have you successfully set up the project and given it domain-wide delegation? That is the only point at which you need to set up access from Google Admin. Once that's been set up, it should be able to do everything your super admin account has access to.
https://github.com/GAM-team/GAM/wiki/How-to-Install-GAM7#enable-gam7-service-account-access-1

Groups info is here:

This is what a typical report script for me looks like. This is for all group settings. If you just wanted to report on all the group addresses, just remove the 'settings' part and it's a much quicker report to run.
$Date = Get-Date
$Date = $Date.ToString('yyyy-MM-dd_hh-mm')

$folder = "id:Folder ID of where I want my report to go"
$title = "$date - All Groups"

#All groups
gam print groups settings todrive tdtitle $title tdparent $folder

And then for memberships of groups. I just use # to comment out what I don't want it to report on. As written, it would create 3 reports with the same name reporting on 3 different things.
$Date = Get-Date
$Date = $Date.ToString('yyyy-MM-dd_hh-mm')

$folder = "id:Folder ID of where I want my report to go"
$title = "$date - Group members"

#All members
gam print group-members todrive tdtitle $title tdparent $folder

#Members of groups, filtering the groups that match a certain domain
#EXAMPLE of an exclusion match: gam print group-members domain <Your Domain> emailmatchpattern not '^<Text to Match>.*' roles owners
gam print group-members emailmatchpattern ".*example.com$"  todrive tdtitle $title tdparent $folder

#Report all external members: add in a memberemailskippattern to of each of your internal domains, so only external domains remain.
gam print group-members memberemailskippattern "(.*@internaldomain1.com|.*@internaldomain2.com)" todrive tdtitle $title tdparent $folder

And where I think this will leading is you probably want to manage the group settings. Here's an example of reporting on all groups, putting it into a CSV, then taking the CSV as an input to update the setting on all groups. ~email is the header of the report CSV (this is case sensitive).
https://github.com/GAM-team/GAM/wiki/Groups#gui-api-group-settings-mapping (and also ctrl+f on this page for 'GroupSettingsAttribute' to show you the options)
$Date = Get-Date
$Date = $Date.ToString('yyyy-MM-dd_hh-mm')

$csvAllGroups = "C:\GAM\Reports\$date-AllGroups.csv"

#Report all groups
gam redirect csv $csvAllGroups print groups

#Update group spam_moderation_level to Allow on input CSV
gam csv $csvAllGroups gam update group "~email" spam_moderation_level allow

Hope that gets you started.

Aston

Ieisha Doyle

unread,
Jun 4, 2025, 9:11:14 AMJun 4
to google-ap...@googlegroups.com
Hi Aston, 

Thanks for your help. I've managed to get it set up now.

Kind Regards,

  Ieisha Doyle

  IT Engineer

  Teams: ieisha...@smg-team.com
  A60 Great Portland St, London, W1W 7RT

  W: smg.team

  Follow us on LinkedIn


On Mon, 2 Jun 2025 at 22:54, 'Aston Wooller' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:
Have you successfully set up the project and given it domain-wide delegation? That is the only point at which you need to set up access from Google Admin. Once that's been set up, it should be able to do everything your super admin account has access to.

This is what a typical report script for me looks like. This is for all group settings. If you just wanted to report on all the group addresses, just remove the 'settings' part and it's a much quicker report to run.
$Date = Get-Date
$Date = $Date.ToString('yyyy-MM-dd_hh-mm')

$folder = "id:Folder ID of where I want my report to go"
$title = "$date - All Groups"

#All groups
gam print groups settings todrive tdtitle $title tdparent $folder

And then for memberships of groups. I just use # to comment out what I don't want it to report on. As written, it would create 3 reports with the same name reporting on 3 different things.
$Date = Get-Date
$Date = $Date.ToString('yyyy-MM-dd_hh-mm')

$folder = "id:Folder ID of where I want my report to go"
$title = "$date - Group members"

#All members
gam print group-members todrive tdtitle $title tdparent $folder

#Members of groups, filtering the groups that match a certain domain
#EXAMPLE of an exclusion match: gam print group-members domain <Your Domain> emailmatchpattern not '^<Text to Match>.*' roles owners
gam print group-members emailmatchpattern ".*example.com$"  todrive tdtitle $title tdparent $folder

#Report all external members: add in a memberemailskippattern to of each of your internal domains, so only external domains remain.
gam print group-members memberemailskippattern "(.*@internaldomain1.com|.*@internaldomain2.com)" todrive tdtitle $title tdparent $folder

And where I think this will leading is you probably want to manage the group settings. Here's an example of reporting on all groups, putting it into a CSV, then taking the CSV as an input to update the setting on all groups. ~email is the header of the report CSV (this is case sensitive).
Reply all
Reply to author
Forward
0 new messages