Using PowerShell and GAM, updating user account photos in a Google Apps domain is pretty simple. The easiest way to perform this task is by feeding GAM the CSV file directly without using any PowerShell commands, as seen below.
The PowerShell alternative is slower and requires more work to setup, but it allows us to do more than update a single attribute. For example, in addition to updating the user photos in Google Apps, you may need to populate Active Directory with attributes such as phone extensions, home folders, and email accounts. For this reason, knowing how to pipe information into GAM from PowerShell can be useful when writing scripts to automate workflows.
With Google Chromebooks and Chromeboxes exploding in popularity, many technology professionals find themselves trying to manage these devices in bulk. Thankfully, command line tools like GAM allow us to take advantage of the Google Apps API to streamline bulk management tasks. GAM can be used independently, but it works even better in combination with PowerShell.
Using a script similar to the one below, I was able to quickly update over 700 Chromebook devices in a Google Apps domain. I had a spreadsheet with the device's serial number and three columns of information that needed to be added or updated on each device. The spreadsheet was saved in CSV format and looked similar to the text below.
* Update March 2016:
There are much easier ways of accomplishing this task now that GAM can query Chrome device serial numbers. Maybe I'll update this post with a better solution at a later date.