Written by Paul Ogier on November 18, 2025

Installing GAM7 on Windows 11

This lesson is part of the "TAMING GAM7 - A practical guide to GAM7 and GAMADV-XTD3" course.

This lesson will guide you through setting up GAM7 on a Windows 11 Machine.

If you are trying to install GAM7 on another operating system, please refer to these articles:

GAM7 on Ubuntu Linux

GAMADV-XTD3 on Google Cloud Shell

GAM7 on macOS

GAM7 on ChromeOS

Hey there, Google Workspace admins! Ready to manage your Google Workspace like a command-line hero? If you're tired of clicking through endless menus in the Admin console and want to perform powerful bulk operations, it's time to install GAM7.

GAM7 is the new official, unified version of GAM (Google Apps Manager), combining the best of standard GAM and GAMADV-XTD3 into one powerhouse tool.

But let's be honest, getting it set up on Windows can feel a little intimidating. Don't worry! This guide will walk you through every single step in a fun, relatable way. No condescending jargon, just a clear path to getting you up and running on Windows 11.

Let's get started!

GAM-team/GAM: command line management for Google Workspace
Repository files navigation ... GAM is a command line tool for Google Workspace admins to manage domain and user settings quickly and easily. Build StatusM. Quick ...

What You'll Need (Your Quest Awaits!)

Before we dive in, let's gather our supplies:

  1. A Windows 11 Machine: This guide is tailored for it, but the steps are nearly identical for Windows 10.
  2. Google Workspace Super Admin Rights: You'll need these to authorize GAM to work its magic on your domain.
  3. A Bit of Patience: The setup has a few steps, but once it's done, it's done for good. You've got this!

Step-by-Step Installation Guide

Step 1: Download the GAM7 Installer

First, we need to grab the official GAM7 installer.

  1. Head over to the GAM7 GitHub Releases page.
  2. Look for the latest Windows installer file. It will be named something like gam-7.xx.yy-windows-x86_64.msi.
  3. Download that file to your computer.

Step 2: Run the Installer

This is the easy part!

  1. Find the .msi file you just downloaded (usually in your Downloads folder).
  2. Double-click it to run the installer.
  3. Follow the prompts. By default, GAM7 will install to C:\GAM7, which is a great, simple path to use. We'll assume you're using this path for the rest of the guide.

Step 3: Set Up Your Configuration Directory (A Pro-Tip!)

By default, GAM wants to store its important authorization files (like client_secrets.json and oauth2.txt) in a hidden folder in your user profile.

This is fine, but a "pro-tip" for easier management is to create a dedicated, easy-to-find folder for this.

  1. Open File Explorer.
  2. Go to your C:\ drive and create a new folder named GAMConfig.
  3. Now, we need to tell Windows to use this folder. We'll do this by setting a System Environment Variable.
  4. Hit the Windows key and type "Environment Variables".
  5. Click on "Edit the system environment variables".
  6. Click the "Environment Variables..." button.
  7. In the "System variables" (bottom) pane, click "New...".
  8. For Variable name, type: GAMCFGDIR
  9. For Variable value, type: C:\GAMConfig
  10. Click OK on all the windows to close them.

Important: You must restart your Command Prompt or PowerShell session for this change to take effect!

Step 4: Set Up Your Working Directory

You need a "home base" for all your GAM-related files, like CSVs for bulk user uploads, scripts, and command outputs. Let's keep it separate from the program files.

  1. In your C:\ drive, create another new folder named GAMWork.
  2. This is where we'll tell GAM to save things by default.

Step 5: Update Your System Path

Let's make sure you can type gam from anywhere in Command Prompt without having to be in the C:\GAM7 folder.

  1. Go back to your "Environment Variables" (see Step 3).
  2. In the "System variables" pane, find and select the Path variable, then click "Edit...".
  3. Click "New" and add an entry for C:\GAM7.
  4. Click OK on all the windows.
  5. Restart your Command Prompt session again! This is crucial.

Step 6: Initialize GAM7

Now we run our very first GAM command. This command tells GAM where your config directory is and sets your new working directory as the default for file downloads and CSVs.

Open your new Command Prompt or PowerShell window and type:

gam config drive_dir C:\GAMWork verify

You'll see GAM7 spring to life, confirm its new configuration, and create your gam.cfg file inside C:\GAMConfig. You're officially installed!


First-Time Setup: Authorizing GAM7

You've installed GAM, but it can't do anything until you prove to Google that you're an admin and you give it permission.

Step 7: Create Your Google Cloud Project

GAM needs its own project in the Google Cloud console to keep track of API usage. Don't worry, GAM will create this for you.

In your command prompt, run:

gam create project

  • GAM will ask for your Google Workspace Super Admin email address (e.g., admin@yourdomain.com).
  • It will then open a browser window. Sign in with that Super Admin account.
  • Follow the on-screen prompts to create the project.
  • Eventually, it will bring you to a page and ask you to create an "OAuth client".
  • Follow the steps GAM prints in the console:
    1. Choose "Desktop App".
    2. Give it a name (like "GAM7").
    3. Click "Create".
    4. It will show you a Client ID and Client Secret.
    5. Copy the Client ID and paste it back into the GAM command prompt.
    6. Copy the Client Secret and paste it in next.

GAM will finish setting up your project and save a file called client_secrets.json in your C:\GAMConfig folder.

Step 8: Authorize Client Access

Now you have to tell Google, "Yes, this project I just made is allowed to act as an admin."

In your command prompt, run:

gam oauth create

  • You'll see a big list of APIs that GAM wants to use (e.g., "Calendar API," "Drive API," etc.).
  • Just press c and Enter to continue with the defaults.
  • GAM will open another browser window.
  • Sign in again as your Super Admin.
  • You'll see a warning screen: "Google hasn't verified this app." This is normal. The "app" is your project!
  • Click "Advanced" and then "Go to (unsafe)..." to proceed.
  • Click "Allow" to grant permissions.
  • You'll be taken to an authentication code. Copy it.
  • Paste the code back into the GAM command prompt.

GAM will save your authorization in oauth2.txt (in C:\GAMConfig). You're almost there!

Step 9: Authorize Service Account Access

This is the final and most important auth step. This allows GAM to perform actions on behalf of your users (like reading their emails, changing their signatures, or transferring their Drive files).

In your command prompt, run (replacing normaluser@yourdomain.com with a normal user account):

gam user normaluser@yourdomain.com update serviceaccount
  • This will open one last browser window.
  • Sign in as your Super Admin.
  • You'll see a screen titled "Domain Wide Delegation" in the Admin Console.
  • Go back to your GAM prompt. It will be printing a long list of scopes (e.g., https://mail.google.com/https://www.googleapis.com/auth/calendar, etc.).
  • Copy that entire list of scopes (it's one long, comma-separated line).
  • In the browser, paste this list into the "API scopes" box.
  • Click Authorize.

Step 10: Victory Lap!

You did it. The installation and authorization are complete. To prove it, let's run your first real GAM command:

gam info domain

If everything worked, GAM will connect to your domain and print its information. Give yourself a pat on the back!


Tips, Tricks, and Things to Look Out For

  • PowerShell vs. Command Prompt (CMD): GAM works in both, but PowerShell handles quotes differently. If you're using PowerShell and get errors with commands, you might need to be careful with quoting. For example, a query in CMD might be "orgUnitPath='/'" but in PowerShell, it might need to be "'orgUnitPath=/'".
  • Updating GAM: To update GAM7 on Windows, just download the latest .msi installer from the GitHub releases page and run it. It will install right over the old version in C:\GAM7. Your configuration in C:\GAMConfig is safe!
  • The gam.cfg File: This file (in C:\GAMConfig) is your new best friend. You can edit it with Notepad to set defaults. For example, you can add your domain to save

    domain = yourdomain.com

    With that saved, you can now type gam info user bob instead of gam info user bob@yourdomain.com.

Frequently Asked Questions (FAQ)

Q: What's the big deal with GAM7? How is it different from the GAM I was using? 
A: GAM7 is the new, official version that merges "Standard GAM" (by Jay Lee) and "Advanced GAM / GAMADV-XTD3" (by Ross Scroggs). It gives all users the advanced feature set (like bulk CSV operations and complex queries) in one unified tool.

Q: Do I really need to be a Super Admin to use GAM? 
A: You need Super Admin rights for the initial setup(creating the project and authorizing the service account). After setup, you can use GAM with a delegated admin role that has the specific API permissions you need.

Q: Help! I'm behind a corporate proxy! 
A: GAM can handle that! You'll need to set a system environment variable in Windows called HTTPS_PROXY with your proxy's address (e.g., http://192.168.1.1:3128).


And that's it! You're ready to start automating your Google Workspace.

Related Posts