Add Authorig powershell restrict users to send emails to Email group
Import-module activedirectory
Set-ADGroup -Identity “Test Group” -Add @{authOrig=@(‘CN=Test User,OU=Department,OU=People,DC=CONTOSO,DC=EDU’)}
To get the distinguished name from Powershell we can use below command
(Get-ADUser -Identity “Testuser”).DistinguishedName
Below are Attribute Names, Name in GUI, Explanation, names in Powershell (Set-DistributionGroup)
authOrig, Accept messages from , Only senders in the following list can send emails to this group if set, -AcceptMessagesOnlyFrom
dLMemSubmitPerms, same as above, see above but this accepts group, -AcceptMessagesOnlyFromDLMembers
unauthOrig, Reject messages from, Senders in the following list are not allowed to send emails to this group, -RejectMessagesFrom
dLMemRejectPerms, same as above, Prevents recipients who are members of the Distribution lists mentioned from sending email to this Distribution list, -RejectMessagesFromDLMembers
msExchRequireAuthToSendTo, Require that all senders are authenticated(no external users) can send mail to this Distribution list, -RequireAllSendersAreAuthenticated