Hide an Office365 user from Global Address List (GAL) via Powershell
Today we´ll see how to hide a user from the Global Address List (GAL from now on) in Office365 with the user of Poershell.
We all know that it´s possible to hide a Distribution Group or a Security Group from the GAL, but that option is not available for new and existing mailboxes and users via GUI (Graphical User Interface), but it´s possibe with the user of Powershell. So lets see how to do it:
The first thing will be to prepare our environment if we already don´t have it to connect with Microsoft Online Services.
Then we must log on to our Office365 subscription with admin credentials using powershell, and run the following command:
Set-Mailbox -Identity user@contoso.com -HiddenFromAddressListsEnabled $true
Once it finishes, the user will be hidden from the GAL :)
Fast and easy! until next post.