Downloading GAM 

Configure GAM 

Running GAM for the First Time

On Windows, you can do this by going to Start -> Programs -> Accessories -> Command Prompt. > Location of GAM

Now run:  gam info user

You'll be asked to specify which "scopes" you'd like the OAuth token to support. For now, select the last option to continue, all scopes will be selected. Next GAM will open up a web page in order for you to grant access to retrieve data and make changes to your G Suite account. Make sure you are logged in to a Google G Suite Administrator account before granting access. Once you've granted access, switch back to the command prompt window, GAM should already be working to display information about your user account.  

Try to create the user by creating the user as per the below command

gam create user crashtestdummy firstname Crash lastname "Test Dummy" password "BuckleUp"

If you are getting an error like Client is not authorised Kindly browse where the GAM is installed and check whether you are able to get client_secret and oauth2service.Open the oauth2service and find the client ID copy the clientID and Open the Gsuite admin console and browse the URL:  Click on Add and paste the Client ID and paste the below API,,,,,,,,,,,,

Now again try to run the command and check if you are able to create the user.If you are able to create the user then the GAM is correctly configured.

gam create user crashtestdummy firstname Crash lastname "Test Dummy" password "BuckleUp"

For your practice use the commands as per the link the link 

I have run some GAM commands for some customer and below are the snapshots.

Note:Whenever you are using the GAM commands to delete an mail from user mailbox by default only 1 mail is deleted.In order to delete all the email you need to specify keyword doit and max <value> this will delete the mail as per the max value set.

To perform bulk operation Refer the commands as per the article link