Oddly, my CSV list imports using powershell are no longer working. I'm no guru, but my .ps1 script is very simple. See below for a very basic example. However, I am seeing the same thing with any .ps1 csv import I try.
Basically, my list is importing, but I get an error suggesting my GAM commands are wrong. If I substitute the $($entry.xxxx) with the actual gam command and usernames, it works fine. As soon as I switch back to pulling from a .csv $list, it fails again.
$list = Import-Csv users.csv
foreach ($entry in $list)
{
.\gam.exe info user $($entry.username)
}
Spreadsheet layout:
username,
rohern,
When I try to run the above ps1 script I get GAM message:
Google Apps Manager 2.5
Python 2.7.3 final
Windows-7-6.1.7600 AMD64
Usage: gam [OPTIONS]...
Google Apps Manager. Retrieve or set Google Apps domain,
user, group and alias settings. Exhaustive list of commands
Examples:
gam info domain
gam create user jsmith firstname John lastname Smith password secretpass
gam update user jsmith suspended on
gam.exe update group announcements add member jsmith