As a result we will get list of all distribution groups in our environment which has set AcceptMessagesOnlyfrom.

Another problem is to add user to all of those groups.

Good solution is to create Security Group in Active Directory, and add this group to all restricted distribution groups to allow send messages to those restricted groups for all users from security group.

Then if we need to add rights to send to all restricted groups then we can just add this user to security group.

But if you haven’t such security group, then you can again use Powershell to add specified user rights to send to restricted distribution groups.

Use below example, and write an email address of users to add the rights to send: