Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1, Exchange Server 2007
Topic Last Modified: 2007-04-11

This topic explains how to use the Exchange Management Shell to remove an Outlook Web Access virtual directory.

Before You Begin

To perform this procedure, the account you use must be delegated the Exchange Server Administrator role and membership in the local Administrators group for the target server.

For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.

Do not use Internet Information Services (IIS) Manager to remove an Outlook Web Access virtual directory. Using IIS Manager to remove an Outlook Web Access virtual directory may result in what is known as an "orphan" virtual directory. Instead, use the procedure in this topic. You can also use this procedure to remove orphan virtual directories.

If the last Outlook Web Access virtual directory to be removed was an orphan virtual directory, you must manually remove the Outlook Web Access ISAPI filter from the associated Web site.

Procedure

To use the Exchange Management Shell to remove an Outlook Web Access virtual directory

  • To delete a virtual directory named Legacy from a site named "second Web site" on the server named Contoso, run the following command:

    Copy Code
    Remove-OwaVirtualDirectory -identity "Contoso\Legacy (second Web site)"
    

To use the Exchange Management Shell to find orphan virtual directories

  • To find any orphan virtual directories, run the following command:

    Copy Code
    Get-OwaVirtualDirectory | ? { ![DirectoryServices.DirectoryEntry]::Exists($_.MetabasePath) }
    

To use IIS Manager to remove the ISAPI filter when the last Outlook Web Access virtual directory to be removed was an orphan

  1. Open IIS Manager.

  2. Navigate to the Web site that hosted the Outlook Web Access virtual directory, right-click the Web site name, and then select Properties.

  3. Select the ISAPI filters tab.

  4. Remove the Exchange OWA Cookie Authentication ISAPI filter entry.

For more information about syntax and parameters, see Remove-OwaVirtualDirectory.

For More Information

For more information about how to manage Outlook Web Access virtual directories, see Managing Outlook Web Access Virtual Directories in Exchange 2007.