Skip to content

Instantly share code, notes, and snippets.

@fschwiet
Created October 20, 2011 20:01
Show Gist options
  • Save fschwiet/1302170 to your computer and use it in GitHub Desktop.
Save fschwiet/1302170 to your computer and use it in GitHub Desktop.
install IIS via powershell
#
# http://technet.microsoft.com/en-us/library/cc722041%28v=WS.10%29.aspx
#
# Feature names are case-sensitive, and you will get no warnings if you mispell a feature or
# do not include prerequisite features first. Proceed with care.
#
function InstallFeature($name) {
cmd /c "ocsetup $name /passive"
}
InstallFeature IIS-WebServerRole
InstallFeature IIS-WebServer
InstallFeature IIS-CommonHttpFeatures
InstallFeature IIS-DefaultDocument
InstallFeature IIS-DirectoryBrowsing
InstallFeature IIS-HttpErrors
InstallFeature IIS-HttpRedirect
InstallFeature IIS-StaticContent
InstallFeature IIS-HealthAndDiagnostics
InstallFeature IIS-CustomLogging
InstallFeature IIS-HttpLogging
InstallFeature IIS-HttpTracing
InstallFeature IIS-LoggingLibraries
InstallFeature IIS-Security
InstallFeature IIS-RequestFiltering
InstallFeature IIS-WindowsAuthentication
InstallFeature IIS-ApplicationDevelopment
InstallFeature IIS-NetFxExtensibility
InstallFeature IIS-ISAPIExtensions
InstallFeature IIS-ISAPIFilter
InstallFeature IIS-ASPNET
InstallFeature IIS-WebServerManagementTools
InstallFeature IIS-ManagementConsole
InstallFeature IIS-ManagementScriptingTools
import-module WebAdministration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment