Change the Virtual Services Directory
- Check the current autodiscover url with the following command:
1Get-WebServicesVirtualDirectory |fl identity,internalurl,externalurl - Change the Internal autodiscover url with the following command (Servername is the name of your Exchange Server and webmail.domain.com is your customized URL):
1Set-WebServicesVirtualDirectory -Identity “SERVERNAME\EWS (Default Web Site)” -InternalUrl https://webmail.domain.com/EWS/Exchange.asmx -BasicAuthentication:$true - Change the External autodiscover url with the following command (Servername is the name of your Exchange Server and webmail.domain.com is your customized URL):
1Set-WebServicesVirtualDirectory -Identity “SERVERNAME\EWS (Default Web Site)” -ExternalUrl https://webmail.domain.com/EWS/Exchange.asmx -BasicAuthentication:$true
Change the Autodiscover URL
- Check the current autodiscover url
1Get-ClientAccessServer |fl identity,autodiscoverserviceinternaluri - Change the autodiscover url (Servername is the name of your Exchange Server and webmail.domain.com is your customized URL):
1Set-ClientAccessServer -Identity SERVERNAME –AutoDiscoverServiceInternalUri https://webmail.domain.com/Autodiscover/Autodiscover.xml