I need to run some GAM scripts across two domains as a client is migrating; is this possible? I've been trying to find any documentation on setup but there doesn't seem to be :/
Any help is appreciated!
Note: This is not a question about primary or secondary domains - if you need more information on primary/secondary switching I've found GAM3DirectoryCommands to be very helpful and descriptive!
It's not directly possible; however you can achieve this in the following manner:
gam info domain
and gam info user
to see how this affected your gam installgam create project
gam info domain
and gam info user
again to see the differencegam user <your_admin_account_for_the_current_domain> check serviceaccount
before running any commands, otherwise you're likely to get some errors ;)Now you can switch between domains by replacing client_secrets.json, oauth2.txt and oauth2service.json in your GAM install folder (and remember to check serviceaccount
).
Obviously there are many more elegant ways to do this - but this will form the basis of your powershell script in any case ;P
Hope this helps!