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!!
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!!
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.