--
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/91f564f0-6bf3-49e2-92f9-5ed429f2166dn%40googlegroups.com.
This guide explains how to use the GAM (Google Apps Manager) command-line tool to bulk update Chrome policies across multiple organizational units (OUs). This process is especially useful for managing a large number of OUs that require the same policy changes. You'll first make the policy changes in one OU, export those settings, and then use that data to apply the same policies to other OUs.
Prepare the Initial Policy Changes
Make the desired policy changes in the Google Admin console for a single OU. This OU will serve as your template.
Create a file named orgunit.csv with the header "ou" and the path of your template OU (e.g., /Students/School A). This file tells GAM which OU to reference.
Export the Template OU's Policies
Run the following GAM command. This command will export all Chrome policies from the template OU into a CSV file named startjson.csv.
Open startjson.csv using a text editor (like Notepad++, VS Code, or Sublime Text). Do not use spreadsheet software like Excel or Google Sheets, as it will corrupt the JSON formatting.
Identify the Policies to Change
In the startjson.csv file, find the policy names (e.g., chrome.devices.AutoUpdateSettings) that correspond to the changes you made in the Admin console. Take note of these policy names.
Add Target OUs to the CSV
Edit the orgunit.csv file to include all the OUs you want to apply the policies to. Add each OU path on a new line under the "ou" header.
Export Specific Policies for All OUs
Run the following GAM command. This command will query only the specific policies you identified in the previous step for all the OUs listed in your orgunit.csv file.
Note: Replace the example filters with the actual policy names you identified earlier, separated by commas.
Edit the Policy Data
Open startjson.csv with a text editor.
The first row should contain the data from your template OU. Use this as a reference to find the specific JSON value for the policy you want to apply.
Use the find and replace function in your text editor to update the JSON data for all the other OUs with the correct policy settings from your template OU.
Update the Policies
Run the following GAM command to apply the updated policies to all OUs listed in the startjson.csv file.
Verify the Changes
Spot-check a few of the updated OUs in the Google Admin console to ensure the policies have been applied correctly.
It's a good practice to test this entire process on a few test OUs first before applying the changes to your production environment.
On Sep 3, 2025, at 10:54 AM, 'Darin Clausing' via GAM for Google Workspace <google-apps-manager@googlegroups.com> wrote:Good morning,I created a gam command to print out filtered device policies, and that works great, however I can't seem to update the same filtered policies via one command line.Here is what I use to print.gam redirect csv startjson.csv multiprocess csv startup.csv gam print chromepolicies orgunit "~ou" filter chrome.devices.SsoIdpRedirection,chrome.devices.SsoCookieBehavior,chrome.devices.SsoCameraPermissions formatjson quotechar "'"Here is what I tried to used to update (I am thinking it isn't digging the comma separated values, so I am guessing I am passing them wrong)gam csv startjson.csv quotechar "'" gam update chromepolicies chrome.devices.SsoIdpRedirection,chrome.devices.SsoCookieBehavior,chrome.devices.SsoCameraPermissions json "~JSON" ou "~orgUnitPath"
--
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-manager+unsub...@googlegroups.com.