I've been trying to run a powershell script with GAM commands in it via the Task Scheduler on a Windows 2019 server. It says it is running but it never finishes.
If I try to run the script (or any GAM command) I have to open Powershell as an Administrator - then it runs fine.
I use a user to run script that is in the local Administrator's group. I have also set the task to use the following settings:
- Run whether user is logged in or not
- Run with Highest privileges
I have tried changing the option 'Configure for' from 'Windows Vista,Windows Server 2008' to 'Windows Server 2019' and also to 'Windows 7,Window Server 2008 R2', all with no effect.
Has anyone tried this or something similar that worked?