Hi Linh,
We need toconnect to Exchange online first in powershell. And here is the command to edit the allow list:
set the allow list users addresses:
Set-DistributionGroup "group name" –AcceptMessagesOnlyFrom ******@domain.com**,********@domain.com
add the specific users to allow list:
Set-DistributionGroup "group name" –AcceptMessagesOnlyFrom @{add="******@domain.com**","******@domain.com"}**
remove the specific users to allow list:
Set-DistributionGroup "group name" –AcceptMessagesOnlyFrom @{remove="******@domain.com**","******@domain.com"}**
use the following command to check the allow list users:
Get-distributiongroup -identity "group name" | fl acceptmessagesonlyfrom
Reminder: we need to type "" in the command in powershell.
Please provide a screenshot of the command if there is any error. For privacy, please provide the command via private message.
Regards,
Hans