Zoom7000 Posted January 5, 2017 Posted January 5, 2017 Is there an easier way to delelte multiple user accounts and organisational units in G Suite Admin? E.g. I would like to delete last user's Year 6 and all of it's pupils, they are in the following format in G Suite: School Domain OU - Year 6 -- Class 1 --- -- Class 2 --- -- Class 3 --- Etc. I can't delete the top level OU, as it tells me there are sub OUs and I can't delete the sub OUs as there are user accounts in the OU. Is there an easy way to force delete all the users in bulk without having to manually tick 100s of users and then selecting delete per OU? Just trying to save a bit of time and potential RSI from multi clicking!
Zoom7000 Posted January 5, 2017 Author Posted January 5, 2017 I've just downloaded it, installed it, done all the API permissions and credential stuff, and when I try to PowerShell in to GAM, I'm getting the following error: Traceback (most recent call last): File "gam.py", line 10953, in File "gam.py", line 10430, in ProcessGAMCommand File "gam.py", line 1680, in doGetDomainInfo File "gam.py", line 1704, in doGetCustomerInfo File "gam.py", line 1105, in buildGAPIObject File "gam.py", line 1083, in getClientAPIversionHttpService File "gam.py", line 10174, in doRequestOAuth File "oauth2client\util.py", line 137, in positional_wrapper File "oauth2client\tools.py", line 257, in run_flow File "oauth2client\client.py", line 423, in put File "oauth2client\file.py", line 94, in locked_put File "oauth2client\file.py", line 81, in _create_file_if_needed IOError: [Errno 13] Permission denied: u'C:\\Program Files\\GAM\\oauth2.txt' Failed to execute script gam Any ideas?
theeggmaster Posted January 5, 2017 Posted January 5, 2017 I run it with Command Prompt rather than PowerShell. You could try that?
FN-GM Posted January 5, 2017 Posted January 5, 2017 Have you followed this? - https://github.com/jay0lee/GAM/wiki/CreatingClientSecretsFile
Zoom7000 Posted January 6, 2017 Author Posted January 6, 2017 (edited) Have you followed this? - https://github.com/jay0lee/GAM/wiki/CreatingClientSecretsFile Yes, followed this right through to the end, but it's right at the end where I get the error. Edited January 6, 2017 by Zoom7000
enjay Posted January 6, 2017 Posted January 6, 2017 What about setting up Google Apps Directory Sync, so your G Suite is populated from your AD? Then, when you delete them in AD, they will be deleted from G Suite. You can still set this up even though you've already got the accounts in G Suite, it will match them up when it first runs. Plus, if you've already deleted from AD, you can tell GADS to delete anything in G Suite which isn't present in AD. GADS is a time-consuming thing to set up (set a day aside for it), but once you've done it, you don't need to think about it again. There is a "simulate sync" option in GADS - make good use of that when setting it up!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now