Granting SendAs right to a group
  1. Create a distribution list called CRM Users containing two Exchange users who also use Sage CRM. The user email addresses in the example below are ebdenm@panoply-tech.com and mayes@panoply-tech.com.
    Copy
    New-DistributionGroup -Name "CRM Users" -IgnoreNamingPolicy "ebdenm@panoply-tech.com","mayes@panoply-tech.com" |
    %{ Add-DistributionGroupMember -Identity "CRM Users" -Member $_ }
  2. Run the following command to list the members of the distribution group:
    Copy
    Get-DistributionGroupMember "CRM Users"

    This returns the members:

    Name RecipientType
    --- -------------
    ebdenm UserMailbox
    mayes UserMailbox

  3. Send the members of the distribution group to the Get-Mailbox command and forward the array of resolved mailboxes to the Add-MailboxPermission cmdlet. The mailbox for the Sage CRM SMTP user is crmuser@panoply-tech.com:
    Copy
    Get-DistributionGroupMember "CRM Users" | Get-Mailbox | Add-MailboxPermission -User crmuser@panoply-tech.com -AccessRights FullAccess
  4. Set the SendAs permissions:
    Copy
    Get-DistributionGroupMember "CRM Users" | Get-Mailbox | Add-RecipientPermission -AccessRights SendAs -Trustee crmuser@panoply-tech.com