Hiding Microsoft 365 groups from the Global Address List
This recipe will show you how to hide Microsoft 365 groups from the Global Address List (GAL) using PowerShell. This can be useful for reducing clutter or keeping specific groups hidden from general visibility in your organization.
Getting ready
You need to be a Global Administrator or Exchange Administrator or have equivalent permissions to perform these steps. Run PowerShell as a System Administrator to complete the steps in this recipe.
How to do it…
- Install the
ExchangeOnline
PowerShell module if you haven’t already by runningInstall-Module -
Name ExchangeOnlineManagement
. - Use the
Connect-ExchangeOnline
cmdlet to establish a session with your Exchange Online environment (be sure to update it with your own UPN):Connect-ExchangeOnline -UserPrincipalName [email protected] -ShowProgress $true
- Use the
Set-UnifiedGroup
cmdlet to hide the group. ReplaceGroupName
with the name of the group you...