Exchange 2013 - Unable to recreate ECP Virtual Directory using New-EcpVirtualDirectory

Hello,

I had a problem accessing ECP so I decided to recreate its virtual directory on the client access server. I used Remove-EcpVirtualDirectory. The cmd completed successfully. Then I tried running New-EcpVirtualDirectory and am getting the following error:

Argument: -Role ClientAccess
    + CategoryInfo          : InvalidArgument: (:) [New-EcpVirtualDirectory], ArgumentException
    + FullyQualifiedErrorId : 3C22AE5F,Microsoft.Exchange.Management.SystemConfigurationTasks.NewEcpVirtualDirectory

Running the command using the -role clientaccess parameter doesn't change the outcome. I have tried running the Exchange setup using the recoverserver switch but the installator is unable to detect any problems with the installation and refuses to continue with the recover. Any thoughts?

April 4th, 2013 9:00am

What was the exact command you ran?
Free Windows Admin Tool Kit Click here and download it now
April 4th, 2013 9:18am

Hi Martina,

I have tried the following from Microsoft's site:

  New-EcpVirtualDirectory -Identity "server\ecp (default Web site)"

But New-EcpVirtualDirectory doesn't even take the Identity parameter. I then tried:

  New-EcpVirtualDirectory -role clientaccess

  New-EcpVirtualDirectory -InternalUrl 'https://server.domain.com/ecp' -role clientaccess

  New-EcpVirtualDirectory -InternalUrl 'https://server.domain.com/ecp' -role clientaccess -WebSiteName 'Default Web Site' -domaincontroller dc.domain.com

All of these yielded the same results.

April 4th, 2013 9:37am

Try this instead:
New-EcpVirtualDirectory -WebSiteName "Default Web Site" -InternalUrl https://server.domain.com/ecp
New-EcpVirtualDirectory -WebSiteName "Exchange Back End" -InternalUrl https://server.domain.com/ecp

Also see: http://support.microsoft.com/kb/2778897
Free Windows Admin Tool Kit Click here and download it now
April 4th, 2013 9:45am

Thanks for your suggestions. Unfortunately:

  New-EcpVirtualDirectory -WebSiteName "Default Web Site" -InternalUrl https://server.domain.com/ecp

yields the same results.

  New-EcpVirtualDirectory -WebSiteName "Exchange Back End" -InternalUrl https://server.domain.com/ecp leads me through a process of recreating ECP on the mailbox server, not client access.

Finally, the article is helpful after ECP Virtual Directory is created, when users cannot access the sites, but in my case the VD fails to create at all.

April 4th, 2013 10:10am

Ok.

I haven't had this problem, but see if the information in this blog post helps you.
http://www.curu.ca/2013/01/how-to-re-create-ecp-virtual-directory-in-exchange-2013/
Free Windows Admin Tool Kit Click here and download it now
April 4th, 2013 10:18am

Hi,

Sorry for the late answer, I have tried it just now and the results are still the same:

Argument: -Role ClientAccess
    + CategoryInfo          : InvalidArgument: (:) [New-EcpVirtualDirectory], ArgumentException
    + FullyQualifiedErrorId : 3C22AE5F,Microsoft.Exchange.Management.SystemConfigurationTasks.NewEcpVirtualDirectory

April 8th, 2013 8:26am

Can you try the following:

New-EcpVirtualDirectory -server CAS15 -externalurl https://xx.xx.xx/ecp -internalurl https://cas15/ecp

This worked for me.

It created the default ecp website:  CAS15\ecp (Default Web Site) on -server CAS15


  • Edited by sratcli Friday, April 19, 2013 10:51 PM
Free Windows Admin Tool Kit Click here and download it now
April 19th, 2013 10:49pm

Hi,

Unfortunately, this didn't help either, but it has resulted in a different error message which has eventually led me to an answer, so thank you very much for your help!

The problem turned out to be quite strange (or not, I'm not very proficient with Exchange). It turned out that all the commands that I was executing, were actually applied to the mailbox server not to the CAS (hance the -role clientaccess error - it couldn't have been installed on a server that didn't have the role). Once, I used the -server parameter you proposed, the command failed again. The problem now was that while it was finally pointing to the right server it was still using the installation path on the mailbox server (SIC!). Exchange on the mailbox server has been installed at a non-default location and somehow the New-EcpVirtualDirectory command ran on CAS was trying to get to that path. So the trick that finally worked and something that Microsoft again doesn't include in their site was using the parameter -path as part of the command:

new-ecpvirtualdirectory -internalurl https://xx.xx.xx/ecp -role clientaccess -server servername -websitename "Default Web Site" -Path "C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\ecp"

Hope it helps some poor soul some day. Thank you all for your help.

  • Marked as answer by slodziak Friday, April 26, 2013 11:50 AM
April 26th, 2013 11:50am

Definitely did. I was pulling my hair for few days why I cannot recreate new OWA Virtual Directory. Once I specified CAS server it created. I've been googling but unfortunately this error is not indexed yet, found it only through the TechNet.

New-OwaVirtualDirectory -WebSiteName 'Default Web Site'
Argument: -Role ClientAccess
    + CategoryInfo          : InvalidArgument: (:) [New-OwaVirtualDirectory], ArgumentException
    + FullyQualifiedErrorId : 4C8E46FF,Microsoft.Exchange.Management.SystemConfigurationTasks.NewOwaVirtualDirectory
    + PSComputerName        : ac-excas1.a-cloud.local

Worked by:
New-OwaVirtualDirectory -WebSiteName 'Default Web Site' -server <CAS server>

Free Windows Admin Tool Kit Click here and download it now
May 18th, 2013 9:09am

+1

Another poor soul was just help on this today!  Thank you for the -Path help...I was close to giving up!

March 14th, 2014 7:05pm

Thank YOU!  -Path - why it's not documented plainly is beyond me but here I am in 2015 and this little tip "-Path" did the trick. Thanks.
Free Windows Admin Tool Kit Click here and download it now
January 16th, 2015 2:27pm

I'll add on a "thank you" as well for the commands. There's no telling how long I would have been fishing around for an answer and what measures I would have taken.  

This completed a long thread on the support forums here:

https://social.technet.microsoft.com/Forums/en-US/f1e7db0d-8aed-42f4-9ae1-3f7e55468fa9/error-when-adding-the-mailbox-role-to-what-was-a-cas-only-server-ex-2013?forum=exchangesvrdeploy

May 14th, 2015 1:37pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics