Exchange 2007 upgrade CAS ‘owa’ already exists

Currently I am using a test-environment to become familiar with Exchange 2007.
Today I tried to upgrade from Exchange 2007 RTM to SP2.
Whilst trying to upgrade my CAS-server I encountered the following error

The virtual directory ‘owa’ already exists under ‘ExchCAS/Default Web Site’ Parameter name: VirtualDirectoryName

The solution that I used to solve this was to delete the offending virtual directory and all other Exchange related virtual directories by issuing the following lines in the Exchange Management Shell.

Get-OwaVirtualDirectory| foreach-object -process { $id=$_.server.tostring() + ‘\’ + $_.name.tostring(); write-host ‘Going to remove $id’;  Remove-OwaVirtualDirectory -Identity $id }

Get-OabVirtualDirectory | foreach-object -process { $id=$_.server.tostring() + ‘\’ + $_.name.tostring(); write-host ‘Going to remove $id’; Remove-OabVirtualDirectory -Identity $id }

Get-AutodiscoverVirtualDirectory | foreach-object -process { $id=$_.server.tostring() + ‘\’ + $_.name.tostring(); write-host ‘Going to remove $id’; Remove-AutodiscoverVirtualDirectory -Identity $id }

Get-UMVirtualDirectory | foreach-object -process { $id=$_.server.tostring() + ‘\’ + $_.name.tostring(); write-host $id;
Remove-UMVirtualDirectory -Identity $id }

Get-ActiveSyncVirtualDirectory | foreach-object -process { $id=$_.server.tostring() + ‘\’ + $_.name.tostring(); write-host $id; Remove-ActiveSyncVirtualDirectory -Identity $id }

Get-WebServicesVirtualDirectory | foreach-object -process { $id=$_.server.tostring() + ‘\’ + $_.name.tostring(); write-host $id;
Remove-WebServicesVirtualDirectory -Identity $id }

Tags: , , ,

Leave a Reply

You must be logged in to post a comment.