Applies to: Exchange Server 2007
Topic Last Modified: 2007-06-11

The Remove-OwaVirtualDirectory cmdlet removes Outlook Web Access virtual directories that are located in the Internet Information Services (IIS) Web site on a server that is running Microsoft Exchange Server 2007.

Syntax

Remove-OwaVirtualDirectory -Identity <VirtualDirectoryIdParameter> [-DomainController <Fqdn>]

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.VirtualDirectoryIdParameter

This parameter specifies the name or GUID of an Outlook Web Access virtual directory. It is represented as: ServerName\VirtualDirectoryName (WebsiteName).

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name of the domain controller that retrieves data from the Active Directory directory service, include the DomainController parameter in the command.

Detailed Description

To run the Remove-OwaVirtualDirectory cmdlet, you must specify the name of the Outlook Web Access virtual directory that you want to remove.

You might be required to use the Remove-OwaVirtualDirectory cmdlet in the following situations:

  • The Get-OwaVirtualDirectory cmdlet detects an Outlook Web Access virtual directory that is deleted in IIS but was not deleted in Active Directory. These abandoned Outlook Web Access virtual directory objects are known as Active Directory orphans. It is recommended that you remove this kind of Outlook Web Access virtual directory in Active Directory by using the Remove-OwaVirtualDirectory cmdlet.

  • You want to remove all legacy Outlook Web Access virtual directories from your native Exchange 2007 organization. The legacy Outlook Web Access virtual directories may have been created during Exchange 2007 Setup or manually created in an Exchange mixed environment.

  • You are troubleshooting an Outlook Web Access configuration issue that requires that you delete the existing Outlook Web Access virtual directory and then re-create the Outlook Web Access virtual directory.

  • If you uninstall the Client Access server role from the Exchange server, all Outlook Web Access virtual directories on that Exchange server are also removed.

Caution:
The Remove-OwaVirtualDirectory cmdlet permanently removes an Outlook Web Access virtual directory or directories. When you use the Remove-OwaVirtualDirectory cmdlet, make sure that you do not accidentally delete a default Outlook Web Access virtual directory. There are no default values for the Remove-OwaVirtualDirectory cmdlet.
Note:
The Remove-OwaVirtualDirectory cmdlet supports the Confirm flag.

The Remove-OwaVirtualDirectory cmdlet can be run on any server that has the Exchange Server administration tools installed. The account you use must be delegated the following:

  • Exchange Server Administrator role and 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.

Input Types

Return Types

Errors

Error Description

 

 

Exceptions

Exceptions Description

 

 

Example

The following code example removes a specified Outlook Web Access virtual directory named "owa" that is located on the default IIS Web site on an Exchange server named "Contoso."

Copy Code
Remove-OwaVirtualDirectory -identity "Contoso\owa (default web site)"