I recently implemented the Google Apps Password Sync. Unfortunately, I failed to remove the Change Password at First Logon check from the Google Apps Directory Sync before it created thousands of accounts. Before most of them get the chance to logon, I'd like to use the GAM to change this option.
I found the needed command (gam update user [username] changepassword no) but have been unsuccessful in using a PowerShell script with a csv file to run. I have a csv with all the users and was using the following in the script.
$list = Import-Csv AllStudents.csv
foreach ($entry in $list)
{ .\gam.exe update user $($entry.mail) changepassword no
}
When I run this, I get
gam.exe : Traceback (most recent call last):
At C:\AllStudents-ChangePasswordNo.ps1:3 char:19
+ { .\gam.exe <<<< update user $($entry.mail) changepassword no
+ CategoryInfo : NotSpecified: (Traceback (most recent call last)::String) [
], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
File "gam.py", line 6351, in <module>
File "gam.py", line 2613, in doUpdateUser
File "gdata\apps\multidomain\service.pyo", line 96, in UpdateUser
File "gdata\apps\service.pyo", line 537, in _PutProperties
File "gdata\apps\service.pyo", line 498, in _PropertyEntry2Dict
TypeError: 'NoneType' object is not iterable
Does the last line mean that I am unable to use this GAM command with a csv in a script, or else why is this failing. Thanks for any help for this non-programmer.