Checking deprovision command

360 views
Skip to first unread message

Gabriel Clifton

unread,
Feb 15, 2022, 12:32:13 PM2/15/22
to GAM for Google Workspace
I have my Chromebook Google Sheet that lists all of our district Chromebooks with separate tabs for different filtering. On one tab, I have filtering for all Chromebooks that are disabled and have not been used in the past year so I was wanting to write some GAMADV commands that would read the Chromebooks in that tab, send a remote wipe, deprovision those Chromebooks, and move them to our deprovisioned OU.

I was thinking
gam csv gsheet <Email> <Sheet> id:<Tab> gam cros_sn ~SerialNumber command remote_powerwash doit
gam csv gsheet <Email> <Sheet> id:<Tab> gam cros_sn ~SerialNumber command deprovision_retiring_device doit
gam csv gsheet <Email> <Sheet> id:<Tab> gam cros_sn ~SerialNumber ou /DeprovisionedChromebooks
Is that correct? Best order to do that?

Headers
Google OU,Asset Id,Location,Model,SerialNumber

Ross Scroggs

unread,
Feb 15, 2022, 12:37:56 PM2/15/22
to google-ap...@googlegroups.com
Gabriel,

A few edits:
gam csv gsheet <Email> <Sheet> id:<Tab> gam cros_sn ~SerialNumber issuecommand command remote_powerwash doit
gam csv gsheet <Email> <Sheet> id:<Tab> gam cros_sn ~SerialNumber issuecommand command deprovision_retiring_device doit
gam csv gsheet <Email> <Sheet> id:<Tab> gam cros_sn ~SerialNumber update ou /DeprovisionedChromebooks

Ross



--
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 on the web visit https://groups.google.com/d/msgid/google-apps-manager/884b2a30-4410-41a6-bfdc-175f485952a3n%40googlegroups.com.


--

Gabriel Clifton

unread,
Feb 15, 2022, 12:40:33 PM2/15/22
to google-ap...@googlegroups.com
Thanks, Ross! I knew I was missing something.



--

Gabriel Clifton | Network Administrator

Fort Stockton ISD | Technology Center
gabriel...@fsisd.net | http://www.fsisd.net
Office (432) 336-4055 ext 2

Fax (432) 336-4050
1204 W. Second St., 
Fort Stockton, TX 79735

Please note: Although we may sometimes respond to email, text, and phone calls instantly at all hours of the day, our regular support hours are 8:00 AM - 5:00 PM, Monday through Friday. We may need to wait until the next school day to attend to your issue. All issues are worked on a first-come, first-served basis depending on severity, and issues with proper work orders submitted are handled first.

Confidentiality notice: The contents of this email message and any attachments are intended solely for the addressee(s) and may contain confidential and/or privileged information and may be legally protected from disclosure. If you are not the intended recipient of this message or their agent, or if this message has been addressed to you in error, please immediately alert the sender by reply email and delete this message and any attachments. If you are not the intended recipient, you are hereby notified that any use, dissemination, copying, or storage of this message or its attachments is strictly prohibited.
"You must always be willing to work without applause."
— Ernest Hemingway

"You just have to find that thing that's special about you that distinguishes you from all the others, and through true talent, hard work, and passion, anything can happen."
— Dr. Dre

Gabriel Clifton

unread,
Feb 15, 2022, 1:03:04 PM2/15/22
to GAM for Google Workspace
OOF! Talked to Ross and changed the deprovision command to gam csv gsheet <Email> <Sheet> id:<Tab> gam cros_sn ~SerialNumber update action deprovision_retiring_device acknowledge_device_touch_requirement which testing on a single Chromebook worked. I made an oopsie on the OU which should be /Chromebook Deprovision and so far GAMADV is not liking the space. I have tried single quotes ' around the OU and double quotes ", but can't move the Chromebook. On a single device, I tried
gam cros_sn <serial> update ou "/Chromebook Deprovision"
Getting all CrOS Devices that match query (id:<Serial>), may take some time on a large Google Workspace Account...
Got 1 CrOS Device...
Got 1 CrOS Device that matched query (id:<Serial>)
Organizational Unit: /Chromebook Deprovision, Add 1 CrOS Device
  Organizational Unit: /Chromebook Deprovision, CrOS Device: <Device>, Add Failed: 400: invalidInput - Invalid Input: Inconsistent Orgunit id and path in request - 866160149004291, /Chromebook Deprovision

Kim Nilsson

unread,
Feb 15, 2022, 1:09:18 PM2/15/22
to GAM for Google Workspace
We've seen this error before.
I think Ross said it's the API being silly.

I'll see if I can find the "fix/workaround".

Kim Nilsson

unread,
Feb 15, 2022, 1:10:56 PM2/15/22
to GAM for Google Workspace
Gabriel, it's a newish setting in gam.cfg.

gam config update_cros_ou_with_id true save

Info here.

Gabriel Clifton

unread,
Feb 15, 2022, 1:16:50 PM2/15/22
to google-ap...@googlegroups.com
image.png

--
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.

Gabriel Clifton

unread,
Feb 15, 2022, 1:17:07 PM2/15/22
to GAM for Google Workspace
bingo-cousin-eddie.gif

Gabriel Clifton

unread,
Feb 15, 2022, 6:06:19 PM2/15/22
to GAM for Google Workspace
I finally got the approval to run the deprovision command, but ran into an issue on every device in the sheet.

ERROR: Invalid choice (deprovisionretiringdevice): Expected <reboot|remotepowerwash|setvolume|takeascreenshot|wipeusers>
Help: Syntax in file C:\GAMADV-XTD3\GamCommands.txt
Help: Documentation is at https://github.com/taers232c/GAMADV-XTD3/wiki
Command: gam cros_sn <serial> issuecommand command >>>deprovision_retiring_device<<< doit

gam csv gsheet <email> <Sheet> id:<Tab> gam cros_sn ~SerialNumber issuecommand command deprovision_retiring_device doit


Gabriel Clifton

unread,
Feb 15, 2022, 6:10:56 PM2/15/22
to GAM for Google Workspace
Whoops, should have been gam csv gsheet <Email> <Sheet> id:<Tab> gam cros_sn ~SerialNumber update action deprovision_retiring_device acknowledge_device_touch_requirement
Reply all
Reply to author
Forward
0 new messages