Written by Paul Ogier on November 5, 2021

Upgrading GAMADV-XTD3? macOS, Linux, Cloud Shell and Windows...easily!

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

In this video lesson, we will be walking through the process of upgrading GAMADV-XTD3 to the latest version. You can either watch the video below, or follow the images and steps detailed below.

If you are trying to install GAM rather than upgrading it, please refer to these other articles.

GAMADV-XTD3 on Windows 10

GAMADV-XTD3 on Ubuntu Linux


GAMADV-XTD3 on Google Cloud Shell

Let's get started.

This post was updated with new scripts on the 5th November 2021.

To see the article published by Ross Scroggs on GitHub, please see here.

Upgrading GAMADV-XTD3 on Windows 10 and 11

I found this post on the GAM for Google Workspace Google Group where Chris River posted a PowerShell Script on how to update your installation of GAM from whatever version you are running to the latest version.

Create a PS1 file by opening notepad and pasting this script into it and save it as a PS1 file into your GAMADV-XTD3 directory. Mine is located here C:\GAMADV-XTD3

if (.\gam version checkrc) {
  $releases = curl "https://api.github.com/repos/taers232c/GAMADV-XTD3/releases" | ConvertFrom-Json
  $dlurl = ($releases[0].assets | where {$_.name -like "*windows*64.zip"}).browser_download_url
  $dir = (Get-Location).Path
  (new-object System.Net.WebClient).DownloadFile($dlurl, "$dir\gamadv-xtd3-latest-windows-x86_64.zip")
  $oldchangeloglinescount=(Get-Content .\GamUpdate.txt | Select-String .*).count
  Expand-Archive "$dir\gamadv-xtd3-latest-windows-x86_64.zip" "$dir\" -Force
  mv "$dir\gamadv-xtd3\*" "$dir\" -Force
  rm "$dir\gamadv-xtd3\"
  $newchangeloglinescount=(Get-Content .\GamUpdate.txt | Select-String .*).count
  Get-Content .\GamUpdate.txt -Head ($newchangeloglinescount-$oldchangeloglinescount-1)
} else {
  # Nothing, GAM is already up-to-date

Then you just need to run the PowerShell script when you want to update the version of GAM. You can also setup the Windows Scheduler to run this PS1 file each month to keep you as up to date as possible.

Upgrading GAMADV-XTD3 on macOS, Ubuntu, Linux and Google Cloud Shell

Upgrading on these operating systems is much simpler than upgrading on Windows. All you have to do is run this script in the terminal.

Default path $HOME/bin

bash <(curl -s -S -L https://git.io/fhZWP) -l

If you need to specify a path.

bash <(curl -s -S -L https://git.io/fhZWP) -l -d <Path>

If you would like a bash script, a separate one was provided by Chris River.

oldchangeloglinescount=$(wc -l ~/bin/gamadv-xtd3/GamUpdate.txt | awk '{print $1;}')
bash <(curl -s -S -L "https://raw.githubusercontent.com/taers232c/GAMADV-XTD3/master/src/gam-install.sh") -l
newchangeloglinescount=$(wc -l ~/bin/gamadv-xtd3/GamUpdate.txt | awk '{print $1;}')
NC='\033[0m' # No Color
printf "${GREEN}This update includes the following changes:${NC}\n"
head -n $(($newchangeloglinescount - $oldchangeloglinescount)) ~/bin/gamadv-xtd3/GamUpdate.txt

What is next?

That was nice and simple. You now have a bright and shiny updated installation. 

Understanding the full capabilities of how to use GAM and GAMADV-XTD3 for your Google Workspace will increase your productivity and efficiency. Check out our full course of over 9 hours and 50 pages of free resources!

Related Posts