How to change Exchange 2013-2016 urls


$confirmation = Read-Host "Are you Sure You Want To Proceed:"if ($confirmation -eq 'y') proceed
$domain = Read-Host "Voer hier domein naam"
Get-OutlookAnywhere |Select InternalHostName,ExternalHostName
Get-OWAVirtualDirectory |Select InternalURL,ExternalUrl
Get-ECPVirtualDirectory |Select InternalUrl,ExternalUrl
Get-OABVirtualDirectory |select InternalUrl,ExternalUrl
Get-WebServicesVirtualDirectory |select InternalUrl,ExternalUrl
Get-MapiVirtualDirectory |Select InternalUrl,ExternalUrl
Get-ActiveSyncVirtualDirectory |Select InternalUrl,ExternalUrl
Get-ClientAccessService |Select AutoDiscoverServiceInternalUri, AutoDiscoverServiceExternalUri

#Let’s start by configuring the Internal and External Hostnames for Outlook Anywhere.

Set-OutlookAnywhere -Identity "TCLEX16-01\Rpc (Default Web Site)"
-InternalHostname Outlook.thatcloudlab.com -ExternalHostname Outlook.Thatcloudlab.com -ExternalClientsRequireSsl:$false -DefaultAuthenticationMethod NTLM -InternalClientsRequireSsl:$false -SSLOffloading:$true

#Let’s run the following to verify the new Internal and External Host Names

Get-OutlookAnywhere |select InternalHostName,ExternalHostname

#Now let’s move on and configure the URL’s for the OWA virtual directory.

Set-OwaVirtualDirectory -Identity "TCLEX16-01\owa (Default Web Site)"
-InternalUrl https://outlook.thatcloudlab.com/owa -ExternalUrl https://outlook.thatcloudlab.com
-DirectFileAccessOnPublicComputersEnabled:$false

#Let’s verify the newly created URL’s for OWA.

Get-OwaVirtualDirectory |select Name,InternalUrl,ExternalUrl

#Run the Following to set the URL’s for ECP

Set-EcpVirtualDirectory -Identity "TCLEX16-01\ecp (Default Web Site)"
-ExternalUrl https://outlook.thatcloudlab.com/ecp -InternalUrl <a href="https://outlook.thatcloudlab.com/ecp">https://outlook.thatcloudlab.com/ecp</a>

#Run the following to set the URL’s for OAB

Set-OabVirtualDirectory -Identity "TCLEX16-01\OAB (Default Web Site)"
-InternalUrl https://outlook.thatcloudlab.com/oab -ExternalUrl <a href="https://outlook.thatcloudlab.com/oab">https://outlook.thatcloudlab.com/oab</a>

#Run the following to set the URL’s for Web Services

Set-WebServicesVirtualDirectory -Identity "TCLEX16-01\EWS (Default Web Site)"
-InternalUrl https://outlook.thatcloudlab.com/ews/exchange.asmx
–ExternalUrl https://outlook.thatcloudlab.com/ews/exchange.asmx

Get-WebServicesVirtualDirectory |Select InternalUrl,ExternalUrl

#Run the following to set the URL’s for MAPI

Set-MapiVirtualDirectory -Identity "TCLEX16-01\mapi (Default Web Site)"
-InternalUrl https://outlook.thatcloudlab.com/mapi -ExternalUrl <a href="https://outlook.thatcloudlab.com/mapi">https://outlook.thatcloudlab.com/mapi</a>

Get-MapiVirtualDirectory |Select InternalUrl,ExternalUrl

#Run the following to set the URL’s for ActiveSync

Set-ActiveSyncVirtualDirectory -Identity "TCLEX16-01\Microsoft-Server-ActiveSync (Default Web Site)"
-InternalUrl https://outlook.thatcloudlab.com/Microsoft-Server-ActiveSync
-ExternalUrl https://outlook.thatcloudlab.com/Microsoft-Server-ActiveSync

Get-ActiveSyncVirtualDirectory |Select InternalUrl,ExternalUrl

#Run the following to set the URL’s for ClientAccessService

Set-ClientAccessService -AutoDiscoverServiceInternalUri https://outlook.thatcloudlab.com/Autodiscover/Autodiscover.xml
-Identity TCLEXCAS01

Get-ClientAccessService |Select Identity,AutoDiscoverServiceInternalUri

Bijgevoegde bestanden::