With the following following powershell commands you set al the Exchange 2010 virtual directories
Set-ClientAccessServer -Identity ward-ex2010 -AutoDiscoverServiceInternalUri https://casarray.hyperv.local/Autodiscover/Autodiscover.xml
Set-WebServicesVirtualDirectory -Identity "ward-ex2010\EWS (Default Web Site)"-ExternalUrl "https://webmail.wardvissers.nl/ews/exchange.asmx" -InternalUrl "https://casarray.hyperv.local/ews/exchange.asmx"
Set-OABVirtualDirectory -Identity "ward-ex2010\oab (Default Web Site)" -InternalUrl http://casarray.hyperv.local/oab -ExternalUrl https://webmail.wardvissers.nl/oab
Enable-OutlookAnywhere -Server ward-ex2010 -ExternalHostname "webmail.wardvissers.nl" -ClientAuthenticationMethod "Basic" -SSLOffloading:$False
Set-ActiveSyncVirtualDirectory -Identity "ward-ex2010\Microsoft-Server-ActiveSync (Default Web Site)" -InternalURL https://casarray.hyperv.local/Microsoft-Server-Activesync -ExternalURL https://webmail.wardvissers.nl/Microsoft-Server-Activesync
Set-ECPVirtualDirectory –Identity "ward-ex2010\ecp (default web site)" -InternalURL https://casarray.hyperv.local/ECP -ExternalURL https://webmail.wardvissers.nl/ECP
Set-AutodiscoverVirtualDirectory "ward-ex2010\Autodiscover (Default Web Site)" -InternalUrl http:/casarray.hyperv.local -ExternalUrl https://autodiscover.nifv.nl