How to Remove an Outlook Web Access Virtual Directory
Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.
Applies to: Exchange Server 2007, Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3
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:
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:
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
Open IIS Manager.
Navigate to the Web site that hosted the Outlook Web Access virtual directory, right-click the Web site name, and then select Properties.
Select the ISAPI filters tab.
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.