Install IIS 10 and Register ASP.NET 4.7 with a Powershell Script

  • 17 Nov 2017

  • Dan Lister


Here is a nifty little script or two to help install IIS version 10 to a freshly setup machine. The below scripts will not only install IIS and ASP.NET but it will register ASP.NET with IIS so that you can run and host your applications.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters

Show hidden characters

#Requires -RunAsAdministrator
Enable-WindowsOptionalFeature-Online -FeatureName IIS-WebServerRole
Enable-WindowsOptionalFeature-Online -FeatureName IIS-WebServer
Enable-WindowsOptionalFeature-Online -FeatureName IIS-CommonHttpFeatures
Enable-WindowsOptionalFeature-Online -FeatureName IIS-HttpErrors
Enable-WindowsOptionalFeature-Online -FeatureName IIS-HttpRedirect
Enable-WindowsOptionalFeature-Online -FeatureName IIS-ApplicationDevelopment
Enable-WindowsOptionalFeature-Online -FeatureName IIS-NetFxExtensibility
Enable-WindowsOptionalFeature-Online -FeatureName IIS-NetFxExtensibility45
Enable-WindowsOptionalFeature-Online -FeatureName IIS-HealthAndDiagnostics
Enable-WindowsOptionalFeature-Online -FeatureName IIS-HttpLogging
Enable-WindowsOptionalFeature-Online -FeatureName IIS-LoggingLibraries
Enable-WindowsOptionalFeature-Online -FeatureName IIS-RequestMonitor
Enable-WindowsOptionalFeature-Online -FeatureName IIS-HttpTracing
Enable-WindowsOptionalFeature-Online -FeatureName IIS-Security
Enable-WindowsOptionalFeature-Online -FeatureName IIS-URLAuthorization
Enable-WindowsOptionalFeature-Online -FeatureName IIS-RequestFiltering
Enable-WindowsOptionalFeature-Online -FeatureName IIS-IPSecurity
Enable-WindowsOptionalFeature-Online -FeatureName IIS-Performance
Enable-WindowsOptionalFeature-Online -FeatureName IIS-HttpCompressionDynamic
Enable-WindowsOptionalFeature-Online -FeatureName IIS-WebServerManagementTools
Enable-WindowsOptionalFeature-Online -FeatureName IIS-ManagementScriptingTools
Enable-WindowsOptionalFeature-Online -FeatureName IIS-IIS6ManagementCompatibility
Enable-WindowsOptionalFeature-Online -FeatureName IIS-Metabase
Enable-WindowsOptionalFeature-Online -FeatureName IIS-HostableWebCore
Enable-WindowsOptionalFeature-Online -FeatureName IIS-CertProvider
Enable-WindowsOptionalFeature-Online -FeatureName IIS-WindowsAuthentication
Enable-WindowsOptionalFeature-Online -FeatureName IIS-DigestAuthentication
Enable-WindowsOptionalFeature-Online -FeatureName IIS-ClientCertificateMappingAuthentication
Enable-WindowsOptionalFeature-Online -FeatureName IIS-IISCertificateMappingAuthentication
Enable-WindowsOptionalFeature-Online -FeatureName IIS-ODBCLogging
Enable-WindowsOptionalFeature-Online -FeatureName IIS-StaticContent
Enable-WindowsOptionalFeature-Online -FeatureName IIS-DefaultDocument
Enable-WindowsOptionalFeature-Online -FeatureName IIS-DirectoryBrowsing
Enable-WindowsOptionalFeature-Online -FeatureName IIS-WebDAV
Enable-WindowsOptionalFeature-Online -FeatureName IIS-WebSockets
Enable-WindowsOptionalFeature-Online -FeatureName IIS-ApplicationInit
Enable-WindowsOptionalFeature-Online -FeatureName IIS-ASPNET
Enable-WindowsOptionalFeature-Online -FeatureName IIS-ASPNET45
Enable-WindowsOptionalFeature-Online -FeatureName IIS-ASP
Enable-WindowsOptionalFeature-Online -FeatureName IIS-CGI
Enable-WindowsOptionalFeature-Online -FeatureName IIS-ISAPIExtensions
Enable-WindowsOptionalFeature-Online -FeatureName IIS-ISAPIFilter
Enable-WindowsOptionalFeature-Online -FeatureName IIS-ServerSideIncludes
Enable-WindowsOptionalFeature-Online -FeatureName IIS-CustomLogging
Enable-WindowsOptionalFeature-Online -FeatureName IIS-BasicAuthentication
Enable-WindowsOptionalFeature-Online -FeatureName IIS-HttpCompressionStatic
Enable-WindowsOptionalFeature-Online -FeatureName IIS-ManagementConsole
Enable-WindowsOptionalFeature-Online -FeatureName IIS-ManagementService
Enable-WindowsOptionalFeature-Online -FeatureName IIS-WMICompatibility
Enable-WindowsOptionalFeature-Online -FeatureName IIS-LegacyScripts
Enable-WindowsOptionalFeature-Online -FeatureName IIS-LegacySnapIn
Enable-WindowsOptionalFeature-Online -FeatureName IIS-FTPServer
Enable-WindowsOptionalFeature-Online -FeatureName IIS-FTPSvc
Enable-WindowsOptionalFeature-Online -FeatureName IIS-FTPExtensibility

view raw install-iis.ps1 hosted with ❤ by GitHub

Show hidden characters

#Requires -RunAsAdministrator
dism /online /enable-feature/all /featurename:IIS-ASPNET45

view raw register-aspnet.ps1 hosted with ❤ by GitHub


Disqus Comments

We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

G

Join the discussion…

Comment

Log in with
or sign up with Disqus or pick a name

Disqus is a discussion network

  • Don't be a jerk or do anything illegal. Everything is easier that way.

Read full terms and conditions

This comment platform is hosted by Disqus, Inc. I authorize Disqus and its affiliates to:

  • Use, sell, and share my information to enable me to use its comment services and for marketing purposes, including cross-context behavioral advertising, as described in our Terms of Service and Privacy Policy, including supplementing that information with other data about me, such as my browsing and location data.
  • Contact me or enable others to contact me by email with offers for goods or services
  • Process any sensitive personal information that I submit in a comment. See our Privacy Policy for more information

Acknowledge I am 18 or older

I'd rather post as a guest

  • 4

  • Discussion Favorited!

Favoriting means this is a discussion worth sharing. It gets shared to your followers' Disqus feeds, and gives the creator kudos!

Find More Discussions

Share

will it be available in the iis app polls

see more

Show more replies

Load more comments

live.rezync.com

live.rezync.com is blocked

This page has been blocked by an extension

  • Try disabling your extensions.

ERR_BLOCKED_BY_CLIENT

Reload

This page has been blocked by an extension

pippio.com

pippio.com is blocked

This page has been blocked by an extension

  • Try disabling your extensions.

ERR_BLOCKED_BY_CLIENT

Reload

This page has been blocked by an extension