I'm looking to bulk deprovision chrome devices that have not already been Deprovisioned. Is there a way to check for any device found in a CSV file that has a status "NOT DEPROVISIONED". Here is where i'm at in the script but not sure what is the NOT operand.
CSV header SerialNumber
..list of SN..'s
gam redirect stdout ./output.txt multiprocess redirect stderr stdout multiprocess csv dprolist.csv gam update cros query "id:~~SerialNumber~~ status:NOT DEPROVISIONED" ou "/Deprovisioned" action deprovision_different_model_replace acknowledge_device_touch_requirement
.... lastSync: 2023-08-23T09:09:36-07:00
serialNumber: 5CD014BM4M
status: DEPROVISIONED
model: HP Chromebook 11 G7 EE
IF status: DEPROVISIONED is removed the error I get is this:
Got 1 CrOS Device that matched query (id:5CD0147R4L)
CrOS Device: fa3995cf-b38b-4e68-8deb-59f92f71b3d1, Deprovision Failed: Illegal device state transition.
Thank you everyone for all the kind help.