My original post here was not quite correct - in fact, if you followed it to the letter you would have broken your Exchange Back End beyond repair without deploying new roles to new servers.
The topology of Exchange 2013 is akin to that of 2003 as in you now have a Front End/Back End relationship;
Back End = Mailbox role = (Exchange Back End) virtual directories
Front End = CAS role = (Default Web Site) virtual directories
Recommended reading: http://blogs.technet.com/b/get-exchangehelp/archive/2013/02/07/managing-exchange-2013-iis-virtual-directories-amp-web-applications.aspx
There is configuration in Active Directory (CN=Configuration, DC=domain, DC=local, CN=Services, CN=Microsoft Exchange, CN=Name, CN=Administrative Groups, CN=Servers, CN=ServerName, CN=Protocols, CN=HTTP) that is removed when you use the remove-owavirtualdirectory
and remove-ecpvirtualdirectory commands. These are 'Front End' commands that shouldn't really work on 'Back End' virtual directories, but unfortunately the do. You cannot use the new-owavirtualdirectory and new-ecpvirtualdirectory commands to recreate the
lost AD information of the 'Back End' virtual directories when they are gone.
I repeat again for good measure: Do NOT use these commands on the Exchange Back End virtual directories
or you will break Exchange and not be able to recreate this information using a powershell command. This is the voice of experience and hair loss talking!
The correct procedure to return your virtual directories to a default state is as follows.
Remove Default Web Site virtual directories & AD content for owa/ecp:
remove-owavirtualdirectory -identity "servername\owa (Default Web Site)"
remove-ecpvirtualdirectory -identity "servername\ecp (Default Web Site)"
Remove Exchange Back End virtual directories for owa/ecp:
remove-WebApplication -Site "Exchange Back End" -Name owa
remove-WebApplication -Site "Exchange Back End" -Name ecp
Create the new Default Web Site & AD content virtual directories for owa/ecp:
new-owavirtualdirectory
new-ecpvirtualdirectory
Create the new Exchange Back End virtual directories:
New-WebApplication -Site "Exchange Back End" -Name owa -PhysicalPath "C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\owa" -ApplicationPool MSExchangeOWAAppPool
New-WebApplication -Site "Exchange Back End" -Name ecp -PhysicalPath "C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp" -ApplicationPool MSExchangeECPAppPool
If anyone knows of a way to recreate the AD information for the Back End once lost, please let us know!
-
Edited by
spoonwzd
Monday, July 22, 2013 8:58 AM
Corrected
-
Proposed as answer by
spoonwzd
Monday, July 22, 2013 8:58 AM