Rebuilding Exchange 2007 IIS Default Web Site

I'm trying to find out if there is any commands or configuration that I can run to rebuild Exchange 2007 IIS Default Web Site configuration, this is where OWA is configured etc.
I was also curious if you remove Default Web Site, is there anyway to restore it? without uninstalling/reinstalling Exchange 07?
Thanks...
I was also curious if you remove Default Web Site, is there anyway to restore it? without uninstalling/reinstalling Exchange 07?
Thanks...
Comments
New-OWAVirtualDirectory -OwaVersion:Exchange2003or2000 -VirtualDirectoryType Mailboxes -Name "exchange" -WebSiteName "Default Website"
New-OWAVirtualDirectory -OwaVersion:Exchange2003or2000 -VirtualDirectoryType PublicFolders -Name "public" -WebSiteName "Default Website"
New-OWAVirtualDirectory -OwaVersion:Exchange2003or2000 -VirtualDirectoryType Exchweb -Name "exchweb" -WebSiteName "Default Website"
New-OwaVirtualDirectory -ApplicationRoot "system.string" -DomainController "w2k3en32-s05.soggyrice.local" -OwaVersion "Exchange2007" -WebSiteName "default website"
New-OwaVirtualDirectory : Exchange server "w2k3en64-s04.soggyrice.local" was not found. Please make sure you have typed it correctly.
At line:1 char:24+ New-OwaVirtualDirectory <<<< -ApplicationRoot "system.string" -DomainController "w2k3en32-s05.soggyrice.local" -OwaVersion "Exchange2007" -WebSiteName "default website"
The specified Domain Controller is infact my AD/DC FQDN.
profile: linkedin.com/in/astorrs
The error is the 2nd line...
The WWW Publishing Service has been stopped priot to invoking this cmdlet.
Cmdlet:
New-OwaVirtualDirectory -ApplicationRoot "system.string" -DomainController "w2k3en32-s05.soggyrice.local" -OwaVersion "Exchange2007" -WebSiteName "Default Web Site"
Error:
New-OwaVirtualDirectory : An error occurred while creating the IIS virtual directory 'IIS://w2k3en64-s03.soggyrice.local/W3SVC/1/ROOT/owa' on 'W2K3EN64-S03'.
At line:1 char:24+ New-OwaVirtualDirectory <<<< -ApplicationRoot "system.string" -DomainController "w2k3en32-s05.soggyrice.local" -OwaVersion "Exchange2007" -WebSiteName "Default Web Site"
Others seem to have had the same problem. Can you double check that IIS isn't running in 32-bit compatibility mode?
To switch IIS to 64-bit mode from the command prompt run the following:
cscript c:\inetpub\adminscripts\adsutil.vbs SET /w3svc/AppPools/Enable32BitAppOnWin64 False
(I remembered this all started after you installed GFI MailArchiver, since it uses IIS it might have enabled it)
profile: linkedin.com/in/astorrs
No this wasn't on CBT. I just know the PowerShell command New-OWAVirtualDirectory so I looked up the commands to rebuild the Exchange 2007 specific directories and the 2003 specific directories. There are other directories though such as Autodiscover and EWS, Etc...
For Autodiscover, you would do new-Autodiscovervirtualdirectory.
I don't see a new-ewsvirtualdirectory.
So not really sure what we'd do for that directory.
Edit: Just found this -
http://support.microsoft.com/default.aspx?kbid=320202
Apparently, you have to re-install IIS and then re-install the CAS role to get the Autodiscover/EWS(Availability) stuff going. You can then run the PowerShell commands at the bottom of the article on your Mailbox Server.
This is the most comprehensive approach in rebuilding Exchange 2007 IIS Components.
Thanks!!!
FYI, it's New-WebServicesVirtualDirectory with applicable MS linkage...
http://technet.microsoft.com/en-us/library/bb125176(EXCHG.80).aspx
This worked fine, except some cmdlets.
https://webmail.soggyrice.com/owa