Last active
March 8, 2016 07:47
-
-
Save alirobe/a175761f956521f2fdbe to your computer and use it in GitHub Desktop.
Enable CRM 2013 SP1 - Exchange 2013 Synchronisation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run on exchange machine | |
add-pssnapin Microsoft.Exchange.Management.PowerShell.SnapIn | |
$serviceAccountName = "CrmEmailServiceAcct" | |
$serviceAccountUser = Get-User -Identity $serviceAccountName | |
Get-ExchangeServer | where {$_.IsClientAccessServer -eq $TRUE} | ForEach-Object { | |
Add-ADPermission -Identity $_.distinguishedname -User $serviceAccountUser.identity -AccessRights ExtendedRight -ExtendedRight ms-Exch-EPI-Impersonation | |
Add-ADPermission -Identity $_.distinguishedname -User $serviceAccountUser.identity -AccessRights ExtendedRight -ExtendedRight ms-Exch-EPI-May-Impersonate | |
} | |
Get-MailboxDatabase | ForEach-Object {Add-ADPermission -Identity $_.DistinguishedName -User $serviceAccountName -ExtendedRights ms-Exch-EPI-May-Impersonate} | |
New-ManagementRoleAssignment –Name:impersonationAssignmentForCrm –Role:ApplicationImpersonation –User:$serviceAccountName | |
# in CRM settings -> email -> (new server profile) : set "credentials specified in email server profile." | |
# set user/pass in there, with impersonation enabled. | |
# then: add a mailbox to profile, clear its alerts, run enable, and check alerts. | |
# note : also ensure https://owa.xyz/EWS/Exchange.asmx are incoming and outgoing, and certs works for both CRM and Exchnage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment