Skip to main content

Command Palette

Search for a command to run...

Exchange настройка внутреннего и внешнего URL-адреса

Updated
2 min read
Exchange настройка внутреннего и внешнего URL-адреса

Настройте внутренний URL-адрес в Exchange с помощью PowerShell. Когда внутренний и внешний URL отличается то могут возникать проблемы с сертификатом ssl. Для решения проблемы приводим URL внешний и внутренний к одному виду. Создаем скрипт.

$subdomain = "mail" #enter subdomain
$domain = "idp.com.ua" #enter domain
$servername = "idp-exh01" #enter server name

Get-ClientAccessServer -Identity $servername | Set-ClientAccessServer -AutoDiscoverServiceInternalUri "https://autodiscover.$domain/Autodiscover/Autodiscover.xml"
Get-EcpVirtualDirectory -Server $servername | Set-EcpVirtualDirectory -ExternalUrl "https://$subdomain.$domain/ecp" -InternalUrl "https://$subdomain.$domain/ecp"
Get-WebServicesVirtualDirectory -Server $servername | Set-WebServicesVirtualDirectory -ExternalUrl "https://$subdomain.$domain/EWS/Exchange.asmx" -InternalUrl "https://$subdomain.$domain/EWS/Exchange.asmx"
Get-MapiVirtualDirectory -Server $servername | Set-MapiVirtualDirectory -ExternalUrl "https://$subdomain.$domain/mapi" -InternalUrl "https://$subdomain.$domain/mapi"
Get-ActiveSyncVirtualDirectory -Server $servername | Set-ActiveSyncVirtualDirectory -ExternalUrl "https://$subdomain.$domain/Microsoft-Server-ActiveSync" -InternalUrl "https://$subdomain.$domain/Microsoft-Server-ActiveSync"
Get-OabVirtualDirectory -Server $servername | Set-OabVirtualDirectory -ExternalUrl "https://$subdomain.$domain/OAB" -InternalUrl "https://$subdomain.$domain/OAB"
Get-OwaVirtualDirectory -Server $servername | Set-OwaVirtualDirectory -ExternalUrl "https://$subdomain.$domain/owa" -InternalUrl "https://$subdomain.$domain/owa"
Get-PowerShellVirtualDirectory -Server $servername | Set-PowerShellVirtualDirectory -ExternalUrl "https://$subdomain.$domain/powershell" -InternalUrl "https://$subdomain.$domain/powershell"
Get-OutlookAnywhere -Server $servername | Set-OutlookAnywhere -ExternalHostname "$subdomain.$domain" -InternalHostname "$subdomain.$domain" -ExternalClientsRequireSsl $true -InternalClientsRequireSsl $true -DefaultAuthenticationMethod NTLM

В скрипте все понятно. Просто меняем $subdomain $domain $servername на свои. Запускаем от имени администратора. Перезагружаем сервер.

Проверяем что все отработало, и ссылки правильные. Запускаем Exchange powershell

Вводим команды

Get-ClientAccessService -Identity idp-exh01 | Format-List Identity, AutoDiscoverServiceInternalUri
Get-EcpVirtualDirectory -Server idp-exh01 | Format-List InternalUrl, ExternalUrl
Get-WebServicesVirtualDirectory -Server idp-exh01 | Format-List InternalUrl, ExternalUrl
Get-MapiVirtualDirectory -Server idp-exh01 | Format-List InternalUrl, ExternalUrl
Get-MapiVirtualDirectory -Server idp-exh01 | Format-List InternalUrl, ExternalUrl
Get-OabVirtualDirectory -Server idp-exh01 | Format-List InternalUrl, ExternalUrl
Get-OwaVirtualDirectory -Server idp-exh01 | Format-List InternalUrl, ExternalUrl
Get-PowerShellVirtualDirectory -Server idp-exh01 | Format-List InternalUrl, ExternalUrl
Get-OutlookAnywhere -Server idp-exh01 | Format-List ExternalHostname, InternalHostname

Результат команды выглядит так:

More from this blog

IT Notes

21 posts