Exchange 2016 URLs

After the installation Wizard is complete, the first things you need to do is to set the Exchange URL and setup the SSL certificate to make the installation suitable for production.

The best practice is to use a generic “service” name such as OWA or WebMail (e.g. owa.domain.com) and not the server name for the URL and Certificates.
In a single server installation example we will use the following:

  • External Name: OWA
  • Internal Name: OWA
  • Server Name: Machine1
$i = "machine1"
$externalurl = "owa.domain.com"
$internalurl = "owa.domain.com"

Get-OwaVirtualDirectory -Server $i | Set-OwaVirtualDirectory -ExternalUrl https://$externalurl/owa -InternalUrl https://$internalurl/owa
Get-EcpVirtualDirectory -Server $i | Set-EcpVirtualDirectory -ExternalUrl https://$externalurl/ecp -InternalUrl https://$internalurl/ecp
Get-ActiveSyncVirtualDirectory -Server $i | Set-ActiveSyncVirtualDirectory -ExternalUrl https://$externalurl/Microsoft-Server-ActiveSync -InternalUrl https://$internalurl/Microsoft-Server-ActiveSync
Get-WebServicesVirtualDirectory -Server $i | Set-WebServicesVirtualDirectory -ExternalUrl https://$externalurl/EWS/Exchange.asmx -InternalUrl https://$internalurl/EWS/Exchange.asmx
Get-OabVirtualDirectory -Server $i | Set-OabVirtualDirectory -ExternalUrl https://$externalurl/OAB -InternalUrl https://$internalurl/OAB
Get-MapiVirtualDirectory -Server $i | Set-MapiVirtualDirectory -ExternalUrl https://$externalurl/mapi -InternalUrl https://$internalurl
Get-ClientAccessServer $i | Set-ClientAccessServer -AutoDiscoverServiceInternalUri https://$internalurl/Autodiscover/Autodiscover.xml
Set-PowerShellVirtualDirectory "$i\PowerShell (Default Web Site)" -InternalUrl ((Get-PowerShellVirtualDirectory "$i\PowerShell (Default Web Site)").ExternalUrl)
Get-OfflineAddressBook | Where {$_.ExchangeVersion.ExchangeBuild.Major -Eq 15} | Set-OfflineAddressBook -GlobalWebDistributionEnabled $True -VirtualDirectories $Null

Force Office365 Address lists Synchronization

By default, it takes between 24 to 48 hours for Exchange Online to re-synchronize the address lists and all users to download the most updated information. Unfortunately, the commands available in Exchange on premise to update the Address Lists are not available in Office365 – Exchange Online.

https://technet.microsoft.com/en-us/library/aa997982(v=exchg.160).aspx

Therefore we will need to force that sync manually. Updating the Address Lists, requires requires to have the Address List Management Role. By default in Exchange online, the Address List role isn’t assigned to any role groups.

1 – Connect to Exchange Online

$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session

2 – Create a new Group Role

New-RoleGroup -Name "AddressList" -Roles "Address Lists" -Members Account@domain.com

3 – Run the Following Commands to update the lists

Get-AddressList
Set-AddressList -Identity "All users"

Exchange Hybrid Wizard Returns an MRS Proxy Server Error

After installing Exchange 2016 and properly configured the URLs, I proceeded to run the Hybrid Configuration Wizard via Office365 portal to find an MRS Proxy error.

MRS Proxy Error

To solve this problem, I took the following steps:

  1. Open the Exchange Management Shell.
  2. Run the following command
Get-WebServicesVirtualDirectory "ServerName\EWS (Default Web Site)" |FL Server,MRSProxyEnabled

If “MRSProxyEnabled :False” is returned in the output, this is the cause of the issue.

However, in my case the results where different. The command returned“MRSProxyEnabled :Enabled”. There is an issue on the hybrid server in which MRSProxy shows as Enabled when you run the Get-WebServicesVirtualDirectory cmdlet, but MRSProxy is actually disabled.

SOLUTION: To solve this issue, users will have to Disable the MRSProxy, restart the IIS services, and Re-Enable the MRSProxy

Set-WebServicesVirtualDirectory "<ServerName>\EWS (Default Web Site)" -MRSProxyEnabled $false
IISReset
Set-WebServicesVirtualDirectory "<ServerName>\EWS (Default Web Site)" -MRSProxyEnabled $true
IISReset