I've written a script that will populate a Google group. The first thing I do is run Get-GAGroupMember to get all the current members then I see who I need to add. The script works fine when I run it manually, when I run the scheduled task on demand and when I schedule the task to run while still being logged in but if I schedule the task then I log out that command won't work. I'm running with highest credentials and I'm running whether user is logged in or not.
Any ideas about what's going on? Thanks!
Just an update it seems it can't find the module unless the user that the task is scheduled under, is logged in. Any ideas? I'm importing gShell and I even tried the direct path (C:\Users\User\Docs....). Thanks.
Another update it seems when the user is not logged in it uses either the system account or default user. The error it gives me is:
The member 'FormatsToProcess' in the module manifest is not valid: Cannot find path 'C:\Users\Default\Documents\WindowsPowerShell\Modules\gShell\gShell.Format.ps1xml' because it does not exist.. Please make sure that a valid value is specified for this field in file 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\gShell\gShell.psd1'.
I can copy the gShell folder there but then I get other issues. Is there a way to set this up so it can run in a scheduled task?
--
You received this message because you are subscribed to the Google Groups "gshell-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gshell-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.