?
Solved

Exchange 2010 Accidentally deleted the Default Web Site

Posted on 2014-10-23
19
Medium Priority
?
656 Views
Last Modified: 2014-11-04
I wanted to delete a SharePoint site but the procedure delete all the "Default Web Site" where all the Exchange 2010 virtual directory where mapped.
Is there a simple way to recover the all IIS Exchange configuration ?  Please Help !!!

Thank you.
0
Comment
Question by:Philippe VINOT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 4
  • 4
  • +1
19 Comments
 
LVL 24

Expert Comment

by:VB ITS
ID: 40400515
0
 

Author Comment

by:Philippe VINOT
ID: 40400524
Unfortunately I can't go any more in EMC  : I get an "Initialization failed" error
And Exchange Management Shell tels that it can't connect to the server

Regards,
0
 
LVL 24

Expert Comment

by:VB ITS
ID: 40400534
Ouch. OK next step would be to try re-installing the CAS role on the server.
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

Author Comment

by:Philippe VINOT
ID: 40400537
OK, I will try this ....
0
 

Author Comment

by:Philippe VINOT
ID: 40400558
I've another error when trying to remove the CAS Role :
In the "Unified Messaging Role" part :
"The operation couldn't be performed because object 'MYEXCHSRV' couldn't be found on 'MYDCSRV.mydomain.com'
and then "Setup was unable to uninstall the server role"

I've checked, and  "MYEXCHSRV" object IS in the list of Computers on the DC and I have no problems when logging on MYEXCHSRV with domain accounts.
0
 
LVL 24

Expert Comment

by:VB ITS
ID: 40400592
How are you uninstalling the CAS role? Is it through the Program and Features Control Panel applet?
0
 
LVL 4

Expert Comment

by:Sabi Goraya
ID: 40400816
I have had this issue in the past for a client

If you have a backup restore IIS from backup and that will be the best and easiest option..
0
 
LVL 4

Expert Comment

by:Sabi Goraya
ID: 40400820
PS: Exchange relies on IIS for its communication
Even Exchange console and Shell all work and revolve around the IIS and its authentication.
0
 

Author Comment

by:Philippe VINOT
ID: 40401147
Yes I'm unsinstalling the CAS role through Program and Features.
Unfortunately, I have no backup of this server.
I'm now planing to configure a new server on the domain with Exchange 2010 and to move the mail box from the old server to the new one. Do you think that this will work ?
I can't remember if we can initiate the mailbox move from the destination server ?
And I'm not sure that the new server will be able to connect to the old one  ....
0
 
LVL 24

Expert Comment

by:VB ITS
ID: 40401238
Yes you can initiate a mailbox move from the new server, however I'm not 100% confident that this will work. I still think you should try and remove the CAS role from the current server as opposed to building a new one. I'll do some research on the error message and get back to you.
0
 
LVL 63

Expert Comment

by:Simon Butler (Sembee)
ID: 40402343
Oh dear.
There is an easy way to fix this.

Start Powershell on the server (normal powershell).

Then in the PowerShell window enter the following:

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010

Once the commandlets have been loaded, recreate the PowerShell virtual directory:

New-PowerShellVirtualDirectory -Name Powershell -RequireSSL:$False

If it throws an error, then remove it first

Remove-PowerShellVirtualDirectory "Powershell (Default Web Site)"

Then recreate it.

That should let you start EMC. Once in EMC you can use the console to recreate the virtual directories. If it doesn't work, then you will have to go back to EMS and remove and recreate the virtual directories. The remove step removes them from both Exchange and IIS.

Simon.
0
 

Author Comment

by:Philippe VINOT
ID: 40402382
When I try to create the virtual directory I get the error :
New-PowerShellVirtualDirectory : Web object 'IIS://MYEXCHSRV.mydomain.com/W3S VC/1/ROOT' can't be found.

Any ideas ?
0
 
LVL 63

Expert Comment

by:Simon Butler (Sembee)
ID: 40402473
Did you delete the old one first?

Simon.
0
 

Author Comment

by:Philippe VINOT
ID: 40402655
Yes
Remove-PowerShellVirtualDirectory "Powershell (Default Web Site)"
and then
New-PowerShellVirtualDirectory -Name Powershell -RequireSSL:$False
0
 
LVL 63

Expert Comment

by:Simon Butler (Sembee)
ID: 40402668
Lets step back a bit.
Have you recreated the Default Web Site?
If so, does it have the ID of 1?

In an elevated command prompt, change to the following directory:
C:\Windows\System32\inetsrv\config

Then type notepad applicationHost.config

Find the Default Web Site and change the ID from 123456789 (or whatever ID it is) to 1.
Save the file.
Then run IISRESET and restart the IIS management console. The web site should be shown with the correct ID. You can then follow my previous instructions.

Simon.
0
 

Author Comment

by:Philippe VINOT
ID: 40402785
I can't find the Default Web Site in  applicationHost.config
It's the problem : the default web site has been deleted and I don't know the right way to recreate it.
0
 

Accepted Solution

by:
Philippe VINOT earned 0 total points
ID: 40402826
OK, I think I've got the solution : I've recover the 2 files administration.config and applicationHost.config from
c:\inetpub\history
And after an IISRESET, the default web site with all the Exchange configuration is back.
Some quick tests shows that owa and ECM are working again.
Good News !!!
0
 
LVL 63

Expert Comment

by:Simon Butler (Sembee)
ID: 40403124
To complete the question for anyone else reading this question - to recreate the Default Web site, just create a new web site with the name "Default Web Site". Then renumber it if required as per my instructions above.

Simon.
0
 

Author Closing Comment

by:Philippe VINOT
ID: 40421182
The solutions provided by the answers didn't apply to my situation
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Suggested Courses
Course of the Month12 days, 12 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question