Skip to content
Kim Nilsson edited this page Mar 7, 2022 · 16 revisions

CB_Inventory

A Google Apps Script using Google Sheets to manage Chrome devices in a Google Workspace domain.

It grabs a lot of relevant data into a sheet and displays it in various ways.

You can also update/relocate/disable/enable/deprovision/clear/powerwash devices of your choice.

I definitely recommend you read the contents of the scripts before running any functions. If for nothing else at least so you know it looks like it'll only do what I say. Click Tools /Script editor in the Sheets menu to open it to read.

The scripts can't do anything at all until you authorise them.

And unless you have the proper admin rights you can't read or update any information. This also means that CB_Inventory can be used by delegated limited admins, who are restricted to only their own subsection of your organisation's OUs.

I've run the export from a domain with 34 300 devices without getting a time-out. It did take a while, but it kept going till it was done.

Now, this is not as fancy as GAT+, Gopher for Chrome, BetterCloud or Fleet or other such professional tools, but it has two advantages. It's free, and, for a lot of people, easier than doing the management with GAM.

GAM/GAMADV-XTD3 can, of course, do all this, but it requires a steady hand.

This little thing works great with copy/paste, and a simple menu with a handful options, export, update, enable, disable, deprovision, clear user profiles, powerwash/wipe devices, and some time ago I added a feature to find which OU the most recent user resides in. That data can easily be used to relocate devices there, if you want.

Link to copyable CB_Inventory.

CB_Inventory template

Click the link with your Chromebook admin (often superadmin) account.

Remove Copy of and - Template from name of spreadsheet.

Export device data

Try to run CB Inventory / Export CBs. It should ask for authorisation.

Allow access to your superadmin (or a delegated admin account with necessary access). Else nothing will work.

The script will run and try to download all your CBs' data to the sheet called Devices.

Update device data

If you wish to update any devices' data, copy necessary data to the sheet UpdateCBs.

If you want to enable or disable devices that too can be done in UpdateCBs.

Deprovision devices

The sheet DeprovisionCBs is for deprovisioning, of course.

Add the serial numbers of devices you wish to deprovision, and for each device, select which type of deprovision. Then run the Deprovision command in the menu.

Move devices to the OU where the user is

If you copy serial numbers and most recent user info into the Dislocated sheet (Serial Number and Most Recent User columns) and run the Find users... function it will list where those most recent users belong into the Org Unit Path column of the Located sheet, and then you can bring that info over to UpdateCBs and move your devices there.

Delegated admin account

You can let delegated admins manage devices in a subsection of the organisation's OUs. You will need to create a custom admin role with the following admin rights.
Services: Manage Chrome OS Devices
Admin API Privileges: Read Users

Miscellaneous

All headers have small comments on what you can do and shouldn't.

If you don't want to create a Sheet copy, the scripts are also available here in this repo.

DO NOTE! If you copy the scripts from here, instead of copying the entire Sheets file, you will have to enable the API manually. Here's how you do that. Click the following menus.

Tools / Script Editor Resources Advanced Google Services

Then click the button for

Admin Directory API

Ok and save.