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 Exchange Back End virtual directories for owa/ecp:
Create the new Default Web Site & AD content virtual directories for owa/ecp:
Create the new Exchange Back End virtual directories:
If anyone knows of a way to recreate the AD information for the Back End once lost, please let us know!
Remove Default Web Site virtual directories & AD content for owa/ecp:
Code:
remove-owavirtualdirectory -identity "servername\owa (Default Web Site)"
Code:
remove-ecpvirtualdirectory -identity "servername\ecp (Default Web Site)"
Remove Exchange Back End virtual directories for owa/ecp:
Code:
remove-WebApplication -Site "Exchange Back End" -Name owa
Code:
remove-WebApplication -Site "Exchange Back End" -Name ecp
Create the new Default Web Site & AD content virtual directories for owa/ecp:
Code:
new-owavirtualdirectory
Code:
new-ecpvirtualdirectory
Create the new Exchange Back End virtual directories:
Code:
New-WebApplication -Site "Exchange Back End" -Name owa -PhysicalPath "C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\owa" -ApplicationPool MSExchangeOWAAppPool
Code:
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!