👏 BetterCloud acquires Tricent to revolutionize file security.

Read all about it here.
tricent bc logo

3 Popular GAM Scripts

A step-by-step implementation guide for GAM scripts.

By Tricent · March 26, 2021

“Hey, Reddit. How do I solve the file-sharing issue in Google Drive?”

Jeremy had been using GAM to clean up orphan files and to work out what was externally shared, but it was becoming too labor-intensive to be a good long-term solution. At that point, he trialed GAT+, but he couldn’t choose specific features that he truly needed, which would end up being quite expensive. In April 2021, while looking for an alternative to GAT+ on the r/gsuite Reddit thread, Jeremy stumbled upon a comment where someone mentioned Tricent as a company that had been able to help them out with a problem similar to his.

Tricent is a web application that helps you unshare any Google Drive files shared with third parties. It involves the end-users in the unsharing process while allowing the admins to configure the cleanup (unsharing) settings. It sends out email reminders when it’s time to unshare files, lets you extend the sharing period according to your need, and automatically unshares files if you don’t take any action. What’s more, access to unshared files can easily be restored.

After checking out Tricent’s website, Jeremy requested a demo. The next day, he got contacted by a sales agent, got the demo, and signed the contract within 2 days. BrightLogic was onboarded the following week and, provided everything went well over the summer, MicroFirst would be onboarded, too. Read the full article here.

Before you start reading – there is something you need to know

Did you consider that the complexities of file-sharing pose significant challenges that require more than just basic management tools like Google Apps Manager (GAM)?

You can read more about this here: https://www.tricent.com/blog/why-gam-might-not-be-enough-the-intricacies-of-file-sharing-and-the-need-for-comprehensive-solutions/

A step-by-step implementation guide

In order to follow along with this section, it is required that you download the .zip file from GitHub with the extended GAM scripts. The link can be found here: https://github.com/taers232c/GAM-Scripts

Once downloaded, you can try entering the following scripts into your GAM command-line tool.

Note:

All scripts will be written with quotation marks to indicate the length and spaces in between the characters. When executing the script, you need to remove the quotation marks i.e. “filelistperms.csv” →  filelistperms.csv

1. Find all groups without members

This script lists all Groups in Google Workspace including the number of members, managers, and owners. It then returns all empty groups.

Open GAM

Step 1: Enter “gam print groups memberscount managerscount ownerscount > GroupCounts.csv”

Step 2: Press Enter

Step 3: Wait for the script to be done

Step 4: Enter “python GetEmptyGroups.py GroupCounts.csv EmptyGroups.csv”

Step 5: Press Enter

Step 6: View the results in the “EmptyGroups.csv” file

 

2. How many Google Drive files has your organization shared?

This script lists all files in the users’ “My Drive” including the ACL (Access Control Lists). It then sorts this information and displays all the shared files by file-owner, file-id, file-name, file-permissions, and many other parameters.

Open GAM

Step 1: Enter “gam all users print filelist id title permissions > filelistperms.csv“

Step 2: Press Enter

Step 3: Wait for the script to be done

Step 4: Enter “python GetSharedFiles.py filelistperms.csv sharedfiles.csv”

Step 5: Press Enter

Step 6: View the result in the file  “sharedfiles.csv”

3. Who has delegated access to mailboxes?

A delegated access allows someone else to manage another person’s Google Workspace account/apps e.g. Gmail.  This script lists all people who have delegated access to all mailboxes in your organization and then sorts them accordingly to every mailbox that each user has access to.

Open GAM

Step 1: Enter “gam all users print delegates shownames > AllDelegates.csv“

Step 2: Press Enter

Step 3: Wait for the script to be done

Step 4: Enter “python ShowDelegators.py AllDelegates.csv AllDelegators.csv”

Step 5: Press Enter

Step 6: View the result in the file “AllDelegators.csv”

Try our interactive demo