Restoring Client Access Server configuration

I have created a test server environment to practice disaster recovery in my Exchange environment.  We have a Mail server installed with the typical setup (Mailbox/Hub Transport/Client Access).

I have successfully restored the mailboxes and the hub transport, however when I follow Microsoft's tutorial on how to restore the Client Access portion, I get an error message.

I am referencing this site:

When I run the command:
get-owavirtualdirectory "owa (default web site)" | export-clixml owa.xml -depth 1

It successfully creates the owa.xml file

However, when I run the script that I saved as restorevdir.ps1 , I get the following error message from the Exchange Shell:

New-OwaVirtualDirectory : Command execution stopped because the shell variable "ErrorActionPreference" is set to Stop: The virtual directory 'owa' already exists under ' Web Site'.
Parameter name: VirtualDirectoryName
At C:\Program Files\Microsoft\Exchange Server\bin\restorevdir.ps1:71 char:24
+ new-owavirtualdirectory <<<< -website $ -internalurl $vdir.internalurl -externalurl $vdir.externalurl

I have absolutely no idea what this means.  Can anyone help me edit the script so that it runs successfully?
Who is Participating?
jamorlandoAuthor Commented:
Ugh, literally 1 minute after I posted this after I had been scratching my head for an hour, I found this link and solved my problem.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.