Re: [GAM] Password reset as a scheduled task

51 views
Skip to first unread message
Message has been deleted

Ross Scroggs

unread,
Jun 13, 2025, 10:47:04 AMJun 13
to google-ap...@googlegroups.com
Do: gam version
What is the Config File value?
Is it something like C:\GamConfig ?
If so, make sure that the environment variable GAMCFGDIR is set correctly.
It should be set in System variables, not User variables.

Ross

----
Ross Scroggs



On Jun 13, 2025, at 12:51 AM, Matt Lucas <m.l...@chilwellschool.co.uk> wrote:

I have a powershell script set to reset a group of users passwords daily, when running the script directly (right click and Run with Powershell) it works. When this is run from task scheduler it fails giving the error message

FAILED: user...@domain.com - GAM Exit Code 16. Output: WARNING: Config File: C:\Users\Administrator\.gam\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\Users\Administrator\.gam\oauth2.txt, Not Found WARNING: Config File: C:\Users\Administrator\.gam\gam.cfg, Section: DEFAULT, Item: oauth2service_json, Value: C:\Users\Administrator\.gam\oauth2service.json, Not Found System.Management.Automation.RemoteException ERROR: No Client Access allowed

The powershell script is attached.

From the research I have done it looks like the error "System.Management.Automation.RemoteException" is generated from powershell and not from GAM, has anyone else encountered such issues when running powershell scripts to perform tasks?


If you have an urgent safeguarding concern please contact the out of hours MASH team on 0300 4564546

Otherwise, please allow 24 hours (week days only) for a reply in order for us to process your query.

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-manager/18f06a5f-f583-43d3-89b9-ed1789a6c81fn%40googlegroups.com.
<Password_Reset.txt>

Matt Lucas

unread,
Jun 16, 2025, 4:36:56 AMJun 16
to GAM for Google Workspace

All sorted - call the powershell script from a batch file rather than running directly.
Reply all
Reply to author
Forward
0 new messages