Hi folks,
In this article I will share with you how I configured virtual directories in my Exchange 2016 lab. Please note that there is no dedicated CAS role in Exchange 2016 and it is running as client access services on the Mailbox server.
As you remember I'm quite a lazy guy to configure every server one-by-one either by using EAC or EMS. As the result I have put this little script together which buffers all the virtual directories (for each CAS protocol) and identically configuring internal and external URLs for each of them. This script can be used in any environment which is running Exchange 2010/2013/2016.
The code that I have executed is as follows (of course don't forget to replace URLs with the proper ones in your environment):
Get-OwaVirtualDirectory |foreach {Set-OwaVirtualDirectory -Identity $_.Identity -InternalUrl https://mail.contoso.com/owa -ExternalUrl https://mail.contoso.com/owa}
Get-EcpVirtualDirectory |foreach {Set-EcpVirtualDirectory -Identity $_.Identity -InternalUrl https://mail.contoso.com/ecp -ExternalUrl https://mail.contoso.com/ecp}
Get-oabVirtualDirectory |foreach {Set-OabVirtualDirectory -Identity $_.Identity -InternalUrl https://mail.contoso.com/OAB -ExternalUrl https://mail.contoso.com/OAB}
Get-ActiveSyncVirtualDirectory |foreach {Set-ActiveSyncVirtualDirectory -Identity $_.Identity -InternalUrl https://mail.contoso.comt/Microsoft-Server-ActiveSync -ExternalUrl https://mail.contoso.com/Microsoft-Server-ActiveSync}
Get-WebServicesVirtualDirectory |foreach {Set-WebServicesVirtualDirectory -Identity $_.Identity -InternalUrl https://mail.contoso.com/EWS/Exchange.asmx -ExternalUrl https://mail.contoso.com/EWS/Exchange.asmx}
Get-MapiVirtualDirectory |foreach {Set-MapiVirtualDirectory -InternalUrl https://mail.contoso.com/mapi -ExternalUrl https://mail.contoso.com/mapi -Identity $_.identity -IISAuthenticationMethods Negotiate}
Execution results in something like:
If you are to use this method for the scenario when adding new Exchange 2013/2016 servers into your current organization and are planning to use different namespace you may consider using variables and filters to avoid up with your production environment.
And finally it appears that MS is giving preference to MAPI/HTTP over RPC/HTTP and therefore this protocol is enabled in the brand new Exchange 2016 organization is enabled by default.
To be continued..
In this article I will share with you how I configured virtual directories in my Exchange 2016 lab. Please note that there is no dedicated CAS role in Exchange 2016 and it is running as client access services on the Mailbox server.
As you remember I'm quite a lazy guy to configure every server one-by-one either by using EAC or EMS. As the result I have put this little script together which buffers all the virtual directories (for each CAS protocol) and identically configuring internal and external URLs for each of them. This script can be used in any environment which is running Exchange 2010/2013/2016.
The code that I have executed is as follows (of course don't forget to replace URLs with the proper ones in your environment):
Get-OwaVirtualDirectory |foreach {Set-OwaVirtualDirectory -Identity $_.Identity -InternalUrl https://mail.contoso.com/owa -ExternalUrl https://mail.contoso.com/owa}
Get-EcpVirtualDirectory |foreach {Set-EcpVirtualDirectory -Identity $_.Identity -InternalUrl https://mail.contoso.com/ecp -ExternalUrl https://mail.contoso.com/ecp}
Get-oabVirtualDirectory |foreach {Set-OabVirtualDirectory -Identity $_.Identity -InternalUrl https://mail.contoso.com/OAB -ExternalUrl https://mail.contoso.com/OAB}
Get-ActiveSyncVirtualDirectory |foreach {Set-ActiveSyncVirtualDirectory -Identity $_.Identity -InternalUrl https://mail.contoso.comt/Microsoft-Server-ActiveSync -ExternalUrl https://mail.contoso.com/Microsoft-Server-ActiveSync}
Get-WebServicesVirtualDirectory |foreach {Set-WebServicesVirtualDirectory -Identity $_.Identity -InternalUrl https://mail.contoso.com/EWS/Exchange.asmx -ExternalUrl https://mail.contoso.com/EWS/Exchange.asmx}
Get-MapiVirtualDirectory |foreach {Set-MapiVirtualDirectory -InternalUrl https://mail.contoso.com/mapi -ExternalUrl https://mail.contoso.com/mapi -Identity $_.identity -IISAuthenticationMethods Negotiate}
Execution results in something like:
If you are to use this method for the scenario when adding new Exchange 2013/2016 servers into your current organization and are planning to use different namespace you may consider using variables and filters to avoid up with your production environment.
And finally it appears that MS is giving preference to MAPI/HTTP over RPC/HTTP and therefore this protocol is enabled in the brand new Exchange 2016 organization is enabled by default.
To be continued..
No comments:
Post a Comment