Perform a full IIS 7 + ASP.NET install from the command prompt

29 January 2007


If you have a need to install the full version of IIS 7.0 (all features, options, and modules—including ASP.NET 2.0), you can do this from the command line using the new Package Manager tool as an alternative to the Add/Remove Windows Features interface.

Simply execute the following from an elevated command prompt (it will also output a log file, that's an optional parameter only):

start /w %windir%\system32\pkgmgr.exe /l:logStep.etw /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ASP;IIS-CGI;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSideIncludes;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ODBCLogging;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-ClientCertificateMappingAuthentication;IIS-IISCertificateMappingAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-ManagementScriptingTools;IIS-ManagementService;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;IIS-LegacyScripts;IIS-LegacySnapIn;IIS-FTPPublishingService;IIS-FTPServer;IIS-FTPManagement;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI

This should work with Windows Vista Business, Enterprise, and Ultimate SKUs.  On x64 machines, you’ll want to make sure to execute this from an elevated 64-bit command prompt.

A useful new feature of IIS 7 is its componentization; if you don’t need a particular feature of the server, such as CGI, simply exclude it.

Often while performing testing or preparing a development workstation, using pkgmgr.exe can save a little time if you’re looking for all the features.  You can also modify the parameters to leave off specific features.

Looks like there's finally a document on this at the IIS web site as well, so if you're using Home Premium or want to learn more about pkgmgr.exe, check out the article at


Jeff Wilcox is a Software Engineer at Microsoft in the Open Source Programs Office (OSPO), helping Microsoft engineers use, contribute to and release open source at scale.

comments powered by Disqus