BEVdirIdentity = $RoleNetBIOSName + "\EWS (Exchange Back End)"; $BackEndPort=":444"; $urlToUse = "https://" + $RoleFqdnOrName ...

$BEVdirIdentity = $RoleNetBIOSName + "\EWS (Exchange Back End)";          $BackEndPort=":444";          $urlToUse = "https://" + $RoleFqdnOrName + "/ews/exchange.asmx";          get-WebServicesVirtualDirectory -ShowMailboxVirtualDirectories -Identity $BEVdirIdentity -DomainController $RoleDomainController | remove-WebServicesVirtualDirectory -DomainController $RoleDomainController;          new-WebServicesVirtualDirectory -Role Mailbox -WebSiteName "Exchange Back End" -windowsAuthentication:$true -WSSecurityAuthentication:$true -BasicAuthentication:$false  -InternalNLBBypassUrl $urlToUse -DomainController $RoleDomainController -Force -GzipLevel High;