Tuesday, January 20, 2009

How to Reset Virtual Directories Exchange 2007

For a good reason you have decided to reset OWA virtual directory in exchange 2007 here are the steps to accomplish the goal. Performing same task in Exchange 2003 was more complicated in my opinion. You will find doing this on Exchange 2007 is pretty work.

If you wish to download the .DOC version please click here

Log into Exchange 2007 server Open EMS (Management Shell)

This will show you virtual directories on the CAS server called VMCAS1; change this to your CAS server name

CAS Server name: VMCAS01 (in this example)

  • Log into Exchange 2007 Server
  • Open EMS ( shell)
  • Type >>>>>>>Get-OwaVirtualDirectory -Server VMCAS1 ( Change the CAS server name to your own)

    This command will list the virtual directories for the VMCAS1 server

Get-OwaVirtualDirectory -Server VMCAS1

You can also type below command to see all servers and available directories


Okay we will delete the, OWA virtual directory so goahed type the fallowing PS command into EMS as fallows

  • >>>>Remove-OwaVirtualDirectory -identity "VMCAS1\owa (default web site)"
  • Are you sure you want to perform this action? Press "Y" as in yes.

Remove-OwaVirtualDirectory -identity "VMCAS1\owa (default web site)"

  • Click Start
  • Run
  • InetMGR

Open IIS and verify the OWA directory is gone

You can also issue same PS command as fallows

  • >>>>Get-OwaVirtualDirectory -Server VMCAS1

Now we will put the OWA directories back to the same server

  • >>>>New-OwaVirtualDirectory -Name "VMCAS1\owa (default web site)"

New-OwaVirtualDirectory -Name "VMCAS1\owa (default web site)"

Type again to see the OWA directories are created

  • >>>>Get-OwaVirtualDirectory -Server VMCAS1

Oz ozugurlu

Oz ozugurlu MVP (Exchange)



Security+, Server +, Project+


Anonymous said...

Hello!! I´m Rodrigo.

Well, when i tried to run the last command (to create a new owa virtual directory) i got this error:
New-OwaVirtualDirectory : An error occurred while creating the IIS virtual dir
At line:1 char:24
+ New-OwaVirtualDirectory <<<< -Name "SRVZACCARIA05\owa (default web site)"

Do U Know the solution??
tks for you help.

Oz Ozugurlu said...

Rodrigo, sorry to hear you are having troubles, check this out to see this helps you to remedy the issue,


please keep me posted

Michael said...

In the midst of setting up a redirect from "http://mail.domain.com" to "https://mail.domain.com/owa" (Exchange 2007). I managed to break something in IIS or Exchange (not sure where). Do you have any suggestions on how to either completely reset the entire site or at least get the settings back? And if so, how would I redirect users who browse to "http://mail.domain.com" to go to "https://mail.domain.com/owa". Thanks

Faizan Afzal said...

http://www.elisting.us/ business and personal webpages from united states.

advmovers said...

Best Moving Company +971 50 3605353
Office and staff relocation should run as professionally and cost efficiently as any successful business. Therefore ADV MOVERS Corporate aim to provide you with the best moving services and moves without any comebacks.

Movers in Dubai
office movers in dubai
Affordable Moving Company in Dubai
Packer in Dubai
Re locate services in Dubai
Professional Movers in Dubai
Movers and Packers Abu Dhabi