Home > Exchange 2010 > How to recreate the legacy Exchange Virtual Directories in Exchange 2010

How to recreate the legacy Exchange Virtual Directories in Exchange 2010


The Exchange 2010 install of the CAS role includes the installation of the legacy Exchange Virtual Directories. The Exchange, Public and Exchweb Virtual Directories are placed and configured directly in the IIS metabase, therefore these Virtual Directories are only local to the Server and no longer objects located in Active Directory.

Additionally, the Exchange 2010 New-OWAVirtualDirectory cmdlet no longer recognizes the -Name parameter and is hard coded to use “OWA” for the name. This behavior is by design.

NOTE: This behavior is different than that in Exchange 2007 where it was necessary to use the New-OWAVirtualDirectory in order to recreate the Exchange, Exchweb, and Public Virtual Directories.

NOTE: Running the cmdlet Remove-OWAVirtualDirectory will remove the Exchange, Exchweb, and Public Virtual Directories in addition to the OWA Virtual Directory. The New-OWAVirtualDirectory cmdlet will create a new OWA Virtual Directory as well as the Exchange, Exchweb, and PublicVirtual Directories.

So what happens if we need to manage or recreate only the legacy Exchange Virtual Directories on an Exchange 2010 Server?

Since the legacy Exchange Virtual Directories are no longer listed and manageable in Active Directory, we need to use the appcmd utility (as we do to manage other Virtual Directories in IIS 7 and above) or add the Virtual Directories in IIS manually and modify the applicationHost.config file directly.

Option 1:

In order to recreate the legacy Exchange Virtual Directories using appcmd, take the following actions for each Virtual Directory (Exchange, Exchweb, and Public):

1) Open a command prompt, change directory to%SystemRoot%\System32\inetsrv

2) Replacing Default Web Site with the appropriate Site Name (if different) and <VDir> to the correct legacy Exchange Virtual Directory alias, Run the following commands:

  • appcmd delete vdir /vdir.name:”Default Web Site/<VDir>” /commit:APPHOST
  • appcmd add vdir /app.name:”Default Web Site”/ /path:/<VDir>/physicalPath:”<Exchange Install Directory>\V14\ClientAccess\Owa” /commit:APPHOST
  • appcmd set config “Default Web Site/<VDir>” /section:directoryBrowse /enabled:false /showFlags:”Date, Size, Extension, LongDate” /commit:APPHOST
  • appcmd set config “Default Web Site/<VDir>” /section:handlers /accessPolicy:Read /commit:APPHOST
  • appcmd set config “Default Web Site/<VDir>” /section:windowsAuthentication /enabled:false /commit:APPHOST
  • appcmd set config “Default Web Site/<VDir>” /section:anonymousAuthentication /enabled:true /commit:APPHOST
  • appcmd set config “Default Web Site/<VDir>” /section:digestAuthentication /enabled:false /commit:APPHOST
  • appcmd set config “Default Web Site/<VDir>” /section:basicAuthentication /enabled:false /commit:APPHOST
  • appcmd set config “Default Web Site/<VDir>” /section:defaultDocument /enabled:true /commit:APPHOST
  • appcmd set config “Default Web Site/<VDir>” /section:httpRedirect /enabled:true /destination:/owa /exactDestination:false /childOnly:false /httpResponseStatus:Found /commit:APPHOST

NOTE: I recommend putting the above into a batch file and make 3 copies. Modify each batch to replace the <VDir> with Exchange, Exchweb, or Public.

Option 2:

In order to recreate the legacy Exchange Virtual Directories manually, take the following actions for each Virtual Directory (Exchange, Exchweb, and Public):

1) Open IIS Manager, expand Default Web Site, right click on the <VDir>and choose Remove

2) Highlight the Default Web Site, and choose View Virtual Directories in the Actions pane.

3) In the Actions Pane, choose Add Virtual Directory… Add the correct Alias (Exchange, Exchweb, or Public) and Physical Path which is the“<Exchange Install Directory>\V14\ClientAcess\Owa” and click OK.

NOTE: Default Web Site is set to Anonymous by default, therefore the newly created Virtual Directories should also be set to Anonymous. If not, then modifying the applicationHost.config below will correct the authentication.

4) Once the above is complete, open the applicationHost.config file using notepad which is located in%SystemRoot%\System32\Inetsrv\config\

5) Search for the following: “Default Web Site/owa/14“. Once found, look for the </location>, After the </location>, copy and paste the following text renaming <VDir> to the legacy Exchange Virtual Directory alias:

<location path=”Default Web Site/<VDir>“>
<system.webServer>
<directoryBrowse enabled=”false” showFlags=”Date, Size, Extension, LongDate” />
<handlers accessPolicy=”Read” />
<security>
<authentication>
<windowsAuthentication enabled=”false” />
<anonymousAuthentication enabled=”true” />
<digestAuthentication enabled=”false” />
<basicAuthentication enabled=”false” />
</authentication>
</security>
<defaultDocument enabled=”true” />
<httpRedirect enabled=”true” destination=”/owa” exactDestination=”false” childOnly=”false” httpResponseStatus=”Found”>
<clear />
</httpRedirect>
</system.webServer>
</location>

After recreating the legacy Exchange Virtual Directories and modifying the applicationHost.config, open a command prompt and run:

Iisreset /noforce

 

About these ads
Categories: Exchange 2010
  1. No comments yet.
  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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 225 other followers

%d bloggers like this: