Search code examples
google-chrome-os

GAM commands to get actives devices the last 7 days


I am trying to do some automated reports on Chrome OS devices we have. I would like to have the number of devices that get used the last 7 days, and the same for the month. Google Admin Reports can give me a CSV file with how much devices get used the last seven days, but not automatically, and I can't change the 7 days for a month.

I think it is possible to do this using GAM (Google Application Manager), but I can't manage to get the right results. Tried "gam print cros query "sync:yyyy-mm-dd..yyyy-mm-dd"" but it doesn't give me the same result as Google Admin Reports. Do someone have a clue on how to do this ? Even eventually how to automate it ?


Solution

  • For those who want to do the same and export it on a .csv file :

    For Chromebook activity on 7 days : gam report usage customer parameters cros:num_7day_active_devices > C:\GAM\Activity_7days.csv

    For Chromebook activity on 30 days : gam report usage customer parameters cros:num_30day_active_devices > C:\GAM\Activity_30days.csv