Configure client access server – configure Virtual Directories URL and permissions

Today we will configure Virtual Directories URL, autodiscover and etc.

So first we will configure autodiscover. Open Powershell and type command below:

Set-ClientAccessServer “tcas01” -AutodiscoverServiceInternalUri


if you have CAS server more than one type same command for that server too. For example, i have 2 CAS server:

Set-ClientAccessServer “tcas02” -AutodiscoverServiceInternalUri

To see result  type command below:

Get-ClientAccessServer -Identity tcas01 | fl


Other Virtual directories you can configure like as below:

Outlook anywhere:

Set-OutlookAnywhere -Identity “tcas01\Rpc (Default Web Site)” -InternalHostname -ExternalHostName -InternalClientAuthenticationMethod ntlm -InternalClientsRequireSsl:$True -ExternalClientAuthenticationMethod Basic -ExternalClientsRequireSsl:$True

Set-OutlookAnywhere -Identity “tcas02\Rpc (Default Web Site)” -InternalHostname -ExternalHostName -InternalClientAuthenticationMethod ntlm -InternalClientsRequireSsl:$True -ExternalClientAuthenticationMethod Basic -ExternalClientsRequireSsl:$True

Owa :

Get-OwaVirtualDirectory -Server “tcas01” | Set-OwaVirtualDirectory -InternalURL -ExternalURL

Get-OwaVirtualDirectory -Server “tcas02” | Set-OwaVirtualDirectory -InternalURL -ExternalURL


Get-ecpVirtualDirectory -Server “tcas01” | Set-ecpVirtualDirectory -InternalURL -ExternalURL

Get-ecpVirtualDirectory -Server “tcas02” | Set-ecpVirtualDirectory -InternalURL -ExternalURL


Get-ActiveSyncVirtualDirectory -Server “tcas01” | Set-ActiveSyncVirtualDirectory -InternalURL -ExternalURL

Get-ActiveSyncVirtualDirectory -Server “tcas02” | Set-ActiveSyncVirtualDirectory -InternalURL -ExternalURL


Get-WebservicesVirtualDirectory -Server “tcas01” | Set-WebservicesVirtualDirectory -InternalURL -ExternalURL

Get-WebservicesVirtualDirectory -Server “tcas02” | Set-WebservicesVirtualDirectory -InternalURL -ExternalURL


Get-OABVirtualDirectory -Server “tcas01” | Set-OABVirtualDirectory -InternalUrl -ExternalURL

Get-OABVirtualDirectory -Server “tcas02” | Set-OABVirtualDirectory -InternalUrl -ExternalURL


After that you need to restart IIS with the command below:

iisreset tcas01  

iisreset tcas02 


You can type the following command to see the result of the configuration:

get-ClientAccessServer | fl *url*

get-owavirtualdirectory | fl *url*

get-ecpvirtualdirectory | fl *url*

get-ActiveSyncVirtualDirectory | fl *url*

get-webservicesvirtualdirectory | fl *url*

get-oabvirtualdirectory | fl *url*

That is All . The next article we will look  load balancer the traffic between the CAS servers.


Add Comment