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