Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I know there are scripts available on the Microsoft website to have an unattended installation of IIS, but I was wondering if there is anyone who can help me out with a script to have an unattended uninstall of IIS?

Thank you!!

share|improve this question
    
What have you tried? We're really not fans of doing your job for you. –  Tom O'Connor Dec 10 '12 at 17:39
add comment

1 Answer

On Server 2008 you have two tools to install and un-install Windows components ocsetup.exe and pkgmgr.exe.

When calling any of it, you need to specify the name of the component to un-install.

On 2008 I don't know how to get a list of the installed components, so you can just un-install any possible components.

The following would un-install the components I usually use:

start /w pkgmgr.exe /quite /uu:IIS-WebServerRole;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-HttpErrors;IIS-HttpRedirect;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-Security;IIS-WindowsAuthentication;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-ManagementScriptingTools;IIS-ManagementService;IIS-ApplicationDevelopment;IIS-NetFxExtensibility;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-FTPServer;IIS-FTPSvc;IIS-FTPExtensibility;IIS-DirectoryBrowsing;IIS-ManagementConsole

However you may have other IIS components installed. In theory when specifying IIS-WebServerRole related components should be un-installed as well. I haven't tested any of this because I don't have a 2008 Server anymore.

You can find a full list of the component names on Technet, just include any component you need to un-install.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.