❗ USE AT OWN RISK ❗ |
---|
-
Install Node.js from here. The version must be at least 4.7.4.
-
Follow google developers directions to install clasp from Node.js here.
-
Verify you have Google Apps Script API enabled here.
-
Download latest release here and extract it.
-
Open terminal/cmd/power shell inside project folder. (In Visual Studio Code do Ctrl+Shift+`)
-
Do the following commands:
- Create package.json (Doesn't really matter what you make it, just is needed for clasp login step):
npm init
- Clasp login:
clasp login
- Create Google Sheet with script attached:
clasp create cbManagement
-
Select sheets for where you want the script to install to.
-
Do the following commands:
clasp push clasp open
This will push it to google script, then open the script. -
Now click the sheet. This will take you to the sheet the script is attached to. From here rename it to whatever you want.
-
Download latest release here and extract it.
-
Open a new google sheets document and name it.
-
In
Apps Script
rename the script at the top. -
Copy and paste all of code.js into the code file, replacing everything.
-
Name one "columnRelation" & another "rowsData".
-
Copy the script into the respective ones.
This script is for getting active chrome devices. Sorting them, adding and changing fields, and moving OU's.
I would like to thank everyone below for the great scripts that I was able to use and tweak to make this project happen.
Script & Spreadsheet here. This script was what I used as a base to make mine. I had to change a lot of stuff and later just went in my own direction, but the main get devices and update devices parts are from his script with minor tweaks.
The orginal script can be found here. I ended up tweaking it a bit to make it so the users and not an array of recent users. I also made it only show "ACTIVE" devices. (Google admin keeps deprovisoned device info for a while after they have been deprovisioned, and the get devices would show all devices without this change).
I used his script for letter to column & column to letter. The post I found it on is here. This script was not changed, plus it was very useful.
If you are getting "Execution Policy" error in PowerShell try here for help.