Troubleshooting “XXX Virtual Directory Already Exists” Issues

On the CAS Role, the Exchange install a lot of important virtual directories, such as OWA, EWS, OAB, ActiveSync, to provide more features and access methods for email clients. As these features are mostly handled by IIS, when you apply any changes on these virtual directories like changing the OWA authentication, changing the autodiscover SCP urls, the following things happen:

1. The changes are made from Exchange ECP/EMS/EMC
2. These changes are stored to the AD (DC)

3. AD sync (one-way sync) changes to IIS metabase every 15 minutes (by default).

[Symptom]

===========
If any of the above processes has problems, you will encounter the XXX Virtual Directory Already Exists when you trying to removing/recreating the virtual directories. Even during some Exchange updating, you will see this error message in installation log and let to a failure install of the update.


[Solution]

========
In this situation, we need to manually remove the objects in AD and IIS metabase and renew the virtual directory from scratch. Here are the detailed steps(We will use autodiscover virtual directory as an example):

1. In EMS, please run the following command:


Remove-Autodiscovervirtualdirectory Identity CAS\Autodiscover (xxxxx)

2. Remove the autodiscover objects in AD

a. Open ADSIEDIT.msc, locate:

Configuration-->CN=Services-->CN=Microsoft Exchange-->CN=Organization-->CN=Administrative Groups-->CN=Exchange Administrative Groups-->CN=Servers-->CN=Exchange-->CN=Protocols-->CN=HTTP

b. In the right pane, please check whether the CN=Autodiscover (xxx) is present. If so, please remove it.

3. Delete the autodsicover in metabase

a. Download the IIS 6.0 Resource Kit Tools from the following link:

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499&displaylang=en

b. Install it on the CAS server. Open the Metabase Explorer
c. Locate: Exchange -> LM -> W3SVC -> 1 -> ROOT.
d. Please check whether Autodiscover is present, if so, remove it.

4. After that, please retry the command and see if the autodiscover can be created.

New-AutoDiscoverVirtualDirectory

Set-ClientAccessServer -Identity CAS AutodiscoverServiceInternalUri https://xxxx/autodiscover/autodiscover.xml

March 30th, 2015 9:50pm

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

Other recent topics Other recent topics