Requirements
Exchange Online powershell module
Connect-ExchangeOnline
To view current delivery restrictions
Get-DistributionGroup [email protected]
or
Get-DynamicDistributionGroup
Example:

To add members:
Set-DistributionGroup
or
Set-DynamicDistributionGroup
Example:
Set-DynamicDistributionGroup avastaff -AcceptMessagesOnlyFromSendersOrMembers @{Add="[email protected]"}
For adding multiple members:
@{Add="[email protected]","[email protected]"}

To remove, simply replace @{Add with @{Remove