Home > Exchange, Exchange 2010, Exchange 2010 AKA E14 > #Exchange #Exchange2010 the daily KBs, you fail to create autodiscover virtual directory and get This might be because the object already exists in Active Directory.

#Exchange #Exchange2010 the daily KBs, you fail to create autodiscover virtual directory and get This might be because the object already exists in Active Directory.


Issue:

When creating a new autodiscover virtual directory using New-AutodiscoverVirtualDirectory you will get the error:

The Active Directory object for virtual directory 'IIS://server.domain.com/W3SVC/1/ROOT/Autodiscover' on
 'SERVER' could not be created. This might be because the object already exists in Active Directory.
 Remove the object from Active Directory, then re-create it.
 + CategoryInfo : InvalidOperation: (DAEDALUS\Autodiscover (Default Web Site):ADObjectId)
Solution

Solution:

locate the IIS configuration file and manually remove Autodiscover object. The IIS configuration files are located in ApplicationHost.config located in the path: %windir%\system32\inetsrv\config and remove the <application path=Autodiscover> from it

Notes:

this still applies for other virtual directories like ECP/OWA/OAB


  1. Jeff Peterson
    January 30, 2012 at 6:42 pm

    ECP and Message Tracking unavailable, so I removed ECP VirtualDirectory.
    New-EcpVirtualDirectory gives:

    “The virtual directory ‘ecp’ already exists under ‘Server.Domain.com/Default Web Site'”

    Get-EcpVirtualDirectory returns nothing.

    After removing the section that reads:

    I still get this:

    The WinRM client can not process the request. It cannot determine the content type of the HTTP response from the destination computer.

    What am I missing?

    Thanks.

    • Jeff Peterson
      January 30, 2012 at 6:43 pm

      I forgot to paste the section I removed. Here it is:

      • Jeff Peterson
        January 30, 2012 at 6:47 pm

        OK, That time I KNOW I pasted it, but it didn’t post.

        The part I cut out starts out with <Application Path="/ecp
        It goes on to declare it is in the DefaultAppPool, then defines the path on disk.

  2. February 1, 2012 at 3:43 pm

    sometimes you need to wait a little bit for AD replication to complete, have you solved it?!

  3. Jeff Peterson
    February 1, 2012 at 5:32 pm

    Nope. It’s been 2 days now.

    • February 1, 2012 at 11:55 pm

      Can you send me detailed info about the issue

      • Jeff Peterson
        February 2, 2012 at 1:25 am

        Well, it all started out when I wanted to delegate permission to manage address lists, and I couldn’t because ECP was unavailable. Message tracking was also broken. I removed the ecp virtual directory and created a new one, and it advised me to do the same for the owa virtual directory, so I did. (owa has always been working, and still is).

        It was getting late by then, and while I could finally access ecp, I decided to come back to it the next day. The next day was the day I first posted here. It was broken again, but now I can’t create a new ecp virtual directory.

        Here is what the commands Get and New give me (real names redacted):

        [PS] C:\Windows\system32>Get-EcpVirtualDirectory
        [PS] C:\Windows\system32>new-EcpVirtualDirectory
        The virtual directory ‘ecp’ already exists under ‘Exchange.Company.com/Default Web Site’.
        Parameter name: VirtualDirectoryName
        + CategoryInfo : InvalidArgument: (EXCHANGE\ecp (Default Web Site):ADObjectId) [New-EcpVirtualDirectory], ArgumentException
        + FullyQualifiedErrorId : 7082298B,Microsoft.Exchange.Management.SystemConfigurationTasks.NewEcpVirtualDirectory

        Remove gives this:

        [PS] C:\Windows\system32>Remove-EcpVirtualDirectory
        cmdlet Remove-EcpVirtualDirectory at command pipeline position 1
        Supply values for the following parameters:
        Identity: EXCHANGE\ecp (Default Web Site)
        The operation couldn’t be performed because object ‘EXCHANGE\ecp (Default Web Site)’ couldn’t be found on ‘dc.company.com’.
        + CategoryInfo : NotSpecified: (0:Int32) [Remove-EcpVirtualDirectory], ManagementObjectNotFoundException
        + FullyQualifiedErrorId : 88236691,Microsoft.Exchange.Management.SystemConfigurationTasks.RemoveEcpVirtualDirector

        I’m baffled.

  4. Jeff Peterson
    February 2, 2012 at 2:17 am

    What do you think about removing it in IIS?

  5. February 2, 2012 at 10:07 am

    never do that, try to see if there is an ECP folder under IIS, if not try get-ecpvirtualdirectory | remove-ecpvirtualdirectory

    after that try:
    New-EcpVirtualDirectory -Identity “Server01\ecp (default Web site)”
    server 01 should be your Exchange server

  6. Jeff Peterson
    February 2, 2012 at 5:53 pm

    The ecp folder does exist in IIS. The results of Get, Remove and New Ecpvirtualdirectory are above.

  7. February 2, 2012 at 6:44 pm

    have you tried the command of new-ecpvortialdirectory as I typed it.

  8. Jeff Peterson
    February 2, 2012 at 7:04 pm

    Here is what finally worked:
    1. Download and install IIS 6 Resource Kit.
    2. Login as the local Administrator. Domain admin will not do.
    3. Open Metabase Explorer in RK Tools.
    4. Navigate to LM – W3SVC – 1 -Root
    5. Delete the ECP key and sub keys.
    6. Open EMS and run New-EcpVirtualDirectory.
    &. Sigh from relief.

  9. February 5, 2012 at 11:25 am

    WOW, Forgot totally about the metabase, way to go.

  10. Jeff Peterson
    February 5, 2012 at 9:43 pm

    Thanks.

    For anybody struggling with this, please understand that the IIS 6 Resouce Kit is completely compatible with IIS 7.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: