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

Get-OwaVirtualDirectory







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)

MCITP (EMA), MCITP (EA) MCITP (SA),

MCSE (M+, S+) MCDST,

Security+, Server +, Project+


3 comments:

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
ctory 'IIS://SRVZACCARIA05.ZACCARIA.COM/W3SVC/1/ROOT/owa' on 'SRVZACCARIA05'.
At line:1 char:24
+ New-OwaVirtualDirectory <<<< -Name "SRVZACCARIA05\owa (default web site)"

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

Oz Casey, Dedeal said...

Rodrigo, sorry to hear you are having troubles, check this out to see this helps you to remedy the issue,
http://social.technet.microsoft.com/Forums/en-US/exchangesvrclients/thread/9f23fe1c-ca24-4abf-b880-5517d20b6211/


http://technet.microsoft.com/en-us/library/bb124273.aspx

please keep me posted
best
oz

Unknown 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