We've experienced a few cases lately where students are having their Google passwords reset and then are unable to log in to a Chromebook because it asks for their old password. Using GAMADV-XTD3 I was able to use this command to pull all of the Chromebooks that the student recently used:
gam config csv_output_row_filter "'recentUsers.email:regex:USERNAMEHERE'" print cros todrive recentusers fields deviceid,assetid,org,recentusers
I was then able to use "gam cros issuecommand wipe_users" to wipe the profiles from that small set of Chromebooks, which worked fine. But now I'm getting greedy and am wondering if there's some way to pipe the output from the "print cros" command directly into the "gam cros issuecommand" part. I know "gam cros croscsvfile" can read from a Google Sheet, but I was hoping to just do it piped. Would something like this work?
gam config csv_output_row_filter "'recentUsers.email:regex:USERNAMEHERE'" redirect csv - multiprocess print cros recentusers fields deviceid,assetid,org,recentusers | gam csv - gam issuecommand cros ~deviceid command wipe_users doit
Or is there some way that croscsvfile itself could point to the piped input?