• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 9911
  • Last Modified:

IIS 7 Corrupted and will not Remove from Windows Server 2008


OK i am totally stuck with this one - i have tried everything i know but still no luck. First off, a bit of background information. This server is an active Exchange 2007 server, and is currently in operation. However,  it would not accept OWA requests from the internet. After a lot of researching, it became apparent that that all i could try to do was remove the owa virtual directory. I ran the relevant command from Exchange Management Shell, and it said it removed successfully, although this was the start of all my troubles. I could then not recreate this directory either via IIS or the Exchange Management Shell.

I then tried to remove the default web site, via both IIS and EMS again, however it would not go anywhere, giving ,me an error about the applicationHost.config file being corrupt. I then tried removing IIS Role form the Server Manager, which said it was successful. After rebooting, it appeared that updates were being installed and after logging in, it said that IIS was uninstalled and that i had to reboot. After rebooting (which took much longer than the first time) it gave me the same message, and after rebooting (which took eveeeen longer) it says the same thing AGAIN!! It just will not remove.

After further inspection, i cannot find the IIS Admin Service under services, not can i find WOrld Wide Web Publishing Service. But it still thinks i need to reboot to remove IIS, and will not let me add it until i reboot. But i know if i reboot, i will get the same message again and will go round in this loop forever until it takes all week to reboot.

Has anybody ever had this issue? If not, could somebody pelase guide me through manually removing IIS 7?

It may also be worth noting that i can still open IIS manager, however my server does not appear there. And i cannot delete the Inetsvr folder either, i am assuming because it is protected via Windows File Protection.

Any ideas would be much appreciated!

1 Solution
did the removal of IIS give you any errors in the application event log?

On the plus side your following the right line .. http://support.microsoft.com/kb/320202

Have you tried to add the Web Server (IIS) role and the required role services again? installing it again may fix your issue as it should reinstall the binaries.
You can do it by running the following and the follow the Exchange 2007 part of http://support.microsoft.com/kb/320202

ServerManagerCmd -i Web-Server
ServerManagerCmd -i Web-ISAPI-Ext
ServerManagerCmd -i Web-Metabase
ServerManagerCmd -i Web-Lgcy-Mgmt-Console
ServerManagerCmd -i Web-Basic-Auth
ServerManagerCmd -i Web-Digest-Auth
ServerManagerCmd -i Web-Windows-Auth
ServerManagerCmd -i Web-Dyn-Compression

Open in new window

another thought .. you said the original problem was that you couldn't get OWA to work from the internet.

Did it work internally?
sparky2156Author Commented:

I have managed to remove IIS by removing WPA and stopping al the services, however it will now not reinstall. None of the folders (inetsrv or inetpub) are there anymore, nor are the services, however it just will nto re-install.

As soon as i tried runing your first command, i got a whole load of error messages and prompted to reboot to undo the changes. The followeing is what was returned:

Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\administrator.CHERRYDENTAL>ServerManagerCmd -i Web-Server

Start Installation...
[Installation] Succeeded: [Web Server (IIS)] Management Tools.
[Installation] Succeeded: [Web Server (IIS)] Web Server.
[Installation] Succeeded: [Web Server (IIS)] Common HTTP Features.
[Installation] Succeeded: [Web Server (IIS)] Health and Diagnostics.
[Installation] Succeeded: [Web Server (IIS)] Security.
[Installation] Succeeded: [Web Server (IIS)] Performance.
Error: Installation of [Windows Process Activation Service] Configuration APIs f
ailed. The server needs to be restarted to undo the changes.

Error: Installation of [Windows Process Activation Service] Process Model failed
. The server needs to be restarted to undo the changes.

Error: Installation of [Web Server (IIS)] IIS Management Console failed. The ser
ver needs to be restarted to undo the changes.

Error: Installation of [Web Server (IIS)] HTTP Logging failed. The server needs
to be restarted to undo the changes.

Error: Installation of [Web Server (IIS)] Static Content Compression failed. The
 server needs to be restarted to undo the changes.

Error: Installation of [Web Server (IIS)] Request Filtering failed. The server n
eeds to be restarted to undo the changes.

Error: Installation of [Web Server (IIS)] Request Monitor failed. The server nee
ds to be restarted to undo the changes.

Error: Installation of [Web Server (IIS)] HTTP Errors failed. The server needs t
o be restarted to undo the changes.

Error: Installation of [Web Server (IIS)] Static Content failed. The server need
s to be restarted to undo the changes.

Error: Installation of [Web Server (IIS)] Default Document failed. The server ne
eds to be restarted to undo the changes.

Error: Installation of [Web Server (IIS)] Directory Browsing failed. The server
needs to be restarted to undo the changes.


Error: Installation of one or more roles, role services, or features failed, and
 a restart is required. Check the Server Manager log for additional information
and try again.

I am guessing that the same thing which is causing this not to install from the command is also causing it not to install via server manager.

Do you have any idea how to get IIS to be completely removed, so that i can run a fresh install, or do you know of anything which could be stopping the installation?

To answer your question, yes the internal version of OWA was perfect, is was just external useres. All ports were open, and the external URL was also defined. Users could get to the screen prompting them about the certificate, and when you clicked continue anyway, that is when i got the 404 error and nothing would go any further.

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

ah, IIS looks hosed ... to be honest, it would be a good idea to raise a call with Microsoft to sort it out

BTW, your gonna love this, there was nothing wrong with IIS, you just need to do a bit of configuration with Exchange to sort out External OWA :-(
sparky2156Author Commented:
Yea, i think you are right about it not being corrupted in the first place, but what appeared to be a simple fix destroyed IIS, and as always in IT, once you start down those roads, your committed and theres no way back!

Have you any ideas on how to remove my IIS? doesnt matter how many times i try to install it, it just keeps on failing. Its like there is just some bad configration hanging around somewhere, like the registry ot the file system, and it just keeps getting stuck. As far as Windows is concerned, its not on, but it wont let me install it.

I'm sure if i could jsut get it to re-install, i could remove the Client Access Role, re-install it (using the guide you provided via microsoft) and all the OWA virtual directorys will be recreated. But i just cant get it to install!!!

I will contact Microsoft Support first thing in the monring and raise a support call with them, but in the meantime, do you have any more suggestions?

Thanks for all of your help so far.

if removing it by servermanager or servermanagercmd doesn't work, then I dont have a clue.

Do the event logs say anything of any use?

Let me know what MS say (I am ExMicrosoft Exchange Support)
sparky2156Author Commented:

Sorry for the late reply. Unfortunately, if you remove IIS 7 from Windows Server 2008, it is never going back on properly. . . . EVER!

You just have to re-install the OS, hopefully they will fix this in the next Service Pack release

Also, you are going to love this - the reason that OWA would not work was because the mailboxes had become dismounted on the reboot. Exchange 2007 does not remount the mailbox store after reboot automatically, however this is easily changeable via the Exchange Management Console.

Assume you raised a call with MS? One comment really . Damm, let hope R2 fixes it
im currently in the middle of vigerously testing windows server 208 Enterprise and Datacenter Edition but unfortunately it behaves too much like Vista!!!!

In regards to IIS breaking easily i do believe MicroSoft have released a few updates to sort it out :D
sparky2156Author Commented:
Lets just hope its released soon.

If you uninstall the Windows Process Activation feature you will then be able to install IIS7 again (and then WPA again) with no problem.
A Solution - without reinstalling the OS:

For anyone else who finds this i'd just like to add that i had the same issue - removed IIS and couldnt reinstall it..

Found some information stating that,
*  in server2008 i went in to Start --> Server Manager --> Features --> Remove Features
*  then un-tick the Windows Process Activation Service
*  Reboot the server

Once Rebooted -
*  Go in to Start --> Server Manager and then wait for it tom complete the removal process
*  In Server Manager, GoTo Roles --> Add Role
*  Add IIS and select the features you require.
(Adding IIS also reinstalls the windows process activation service)

Really Hope this helps someone else..

I got the information above from: http://social.technet.microsoft.com/Forums/en-US/winserverwsus/thread/096cd3c2-59c6-49ca-9d1a-a71c53839e85
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.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now