I do all my gam within power shell and never call cmd. For example putting your command into a .ps1 file of: for your example we'll name the file "pwdChange.ps1"
May want to add the gam as fully qualified C:\<InstallationPathTo gam>\gam.exe csv C:\Scripts\PasswordSet\passwordset.csv gam update user ~user password ~pass changepassword ~changepassword
Then for the scheduled task:
* Create/Edit task and for the "Actions" tab
** In the Program/script: box enter
****** C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe (If that's your powershell path.)
** In the Add arguments (optional): box enter:
****** -file "<fully qualified path to>\pwdChange.ps1"