GAM – Hide all users in AD OU from Global Address List

Fairly niche one this one. Needed to hide all the users in a specific group from the GSuite Domain’s Global Address List.

Powershell to the rescue. Pulling through all the users in a specific searchbase and iterating through them with the GAM gal off command.

The script pulls the accounts in the specified OU, including their mail attribute, in to an object. It iterates through that object calling gam.exe, selecting the user by email address and setting gal off.




No Comments


You can leave the first : )



Leave a Reply

Your email address will not be published. Required fields are marked *