Microsoft have removed direct mailbox delivery to the All Company M365 group.
A dynamic dstribution list can be created to enable emailing of all mailboxes.
The recommended approach is to first create the list in the Exchange admin portal and then update the recipient filter with Powershell to exclude shared mailboxes. Creating the group from Powershell directly prevents list ownership being assigned to a non-licenced administrator
Create the group in the Exchange Admnin Portal, selecting 'Users with mailbox' from the default filters provided.
Open powershell and connect-ExchangeOnline -userPrincipalName admnin@contoso.com
Enter the following command
Set-DynamicDistributionGroup -Identity "All Mail Users" -RecipientFilter { (RecipientTypeDetails -eq 'UserMailbox') -and (-not (RecipientTypeDetails -eq 'SharedMailbox')) }
Check group memebership using the Powershell command
Get-Recipient -RecipientPreviewFilter (Get-DynamicDistributionGroup "All Mail Users").RecipientFilter | fl DisplayName
Note: a lengthy set of conditions is automatically appended to the recipient filter. The Exchange admin portal will replace the default recipient filter checkboxes with a text box containing the complete recipient custom filter.
The following powershell commands creates a dynamic distribution list directly but does not allow an owner to be set.
PS>connect-ExchangeOnline -UserPrincipalName admin@contoso.com
New-DynamicDistributionGroup -name "All Mail Users" -RecipientFilter "(RecipientTypeDetails -eq 'UserMailbox') -and (-not (RecipientTypeDetails -eq 'SharedMailbox'))"
Verify group membership
« Go back
Powered by Help Desk Software HESK, in partnership with SysAid Technologies