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. 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 = ""
$internalurl = ""

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.

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 -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session

2 – Create a new Group Role

New-RoleGroup -Name "AddressList" -Roles "Address Lists" -Members

3 – Run the Following Commands to update the lists

Set-AddressList -Identity "All users"

Manage Office365 Via PowerShell (Step 1. Connect to Office365)

The Microsoft’s Software as a Services (SaaS) offering is a set of different components, that I like to call building block, that sits on top of what is called Office365.
The basic components are:

  1. Office365 (Main Component to manage Domains, Users, Licenses, etc)
    1. Exchange Online
    2. SharePoint Online
    3. Skype for Business
    4. Office ProPlus
    5. Yammer

In this particular guide, we will be connecting to Office365 (the main building block) via PowerShell where we will be able to automate the licenses assignment, manage our domain or change the login name of our users.

To connect to Office we just need to follow three basic steps:

  1. Install the required software:
  2. Open the Windows Azure Active Directory Module: Search for the Windows Azure Active Directory Module for Windows PowerShell
  3. Connect to your Office365 Tenant
$UserCredential = Get-Credential
Connect-MsolService -Credential $UserCredential 

After running the last command you will see no response. Therefore, I suggest you to request any information to the Office365 servers to confirm the connection. For instance, you can do Get-MsolAccountSku to return your current Office365 subscriptions.