Exchange 2019: Change the URL's with PowerShell

In one of my previous articles we looked at updating the autodiscover internal URL, today we will update the rest using PowerShell, this includes the following:

  • EWS
  • OAB
  • OWA
  • ActiveSync
  • PowerShell
  • ECP

Here are the list of PowerShell commands that were run to update our lab environment (includes Autodiscover):

  • Set-ClientAccessService -Identity Exchange-2019 -AutodiscoverServiceInternalUri https://mail.<testdomain>.com/autodiscover/autodiscover.xml
  • Get-WebServicesVirtualDirectry -Server Exchange-2019 | Set-WebServicesVirtualDirectory -InternalUrl https://mail.<testdomain>.com/ews/exchange.asmx -ExternalURL https://mail.<testdomain>.com/ews/exchange.asmx
  • Set-OWAVirtualDirectory -identity "Exchange-2019\owa (Default Web Site)" -InternalURL https://mail.<testdomain>.com/owa -ExternalURL https://mail.<testdomain>.com/owa
  • Get-OABVirtualDirectory -Server Exchange-2019 | Set-OABVirtualDirectory -InternalURL https://mail.<testdomain>.com/OAB -ExternalURL https://mail.<testdomain>.com/OAB
  • Get-ECPVirtualDirectory -Server Exchange-2019 | Set-ECPVirtualDirectory -InternalURL https://mail.<testdomain>.com/ECP -ExternalURL https://mail.<testdomain>.com/ECP
  • Get-MAPIVirtualDirectory -Server Exchange-2019 | Set-MAPIVirtualDirectory -InternalURL https://mail.<testdomain>.com/MAPI -ExternalURL https://mail.<testdomain>.com/MAPI -IISAuthenticationMethods NTLM,Negotiate
  • Get-ActiveSyncVirtualDirectory -Server Exchange-2019 | Set-ActiveSyncVirtualDirectory -InternalURL https://mail.<testdomain>.com/Microsoft-Server-ActiveSync -ExternalURL https://mail.<testdomain>.com/Microsoft-Server-ActiveSync
  • Set-OutlookAnywhere -identity "Exchange-2019\RPC (Default Web Site)" -ExternalHostname mail.<testdomain>.com -InternalHostname mail.<testdomain>.com -InternalClientsRequireSSL $true -ExternalClientsRequireSsl $true -ExternalClientAuthenticationMethod:NTLM

http://everything-powershell.com/wp-content/uploads/2018/12/URLs.png