In this article, I’ll show you how to enable all IIS 10 Features on Windows Nano Server 2016 Server using PowerShell.
To get started, Connect to Nano Server, If you don’t have IIS Installed, Install the Nano Server Package Provider below:
Save-Module -Path "$Env:ProgramFiles\WindowsPowerShell\Modules\" -Name NanoServerPackage -MinimumVersion 1.0.1.0
Import-PackageProvider NanoServerPackage
To Install IIS On windows Nano Server 2016 use the cmdlet below:
install-NanoServerPackage -name Microsoft-NanoServer-IIS-Package -culture en-us
By default only the 7 IIS features below are enabled:
- Default document
- Directory browsing
- HTTP Errors
- Static content
- HTTP logging
- Static content compression
- Request filtering
To view all features and their Installation status use
Dism /online /Get-Features
To enable any of the disabled features, use the line below:
dism /Enable-Feature /online /featurename:IIS-IPSecurity /all
To enable all the IIS 10 features, use the line below:
Get-WindowsOptionalFeature -Online | where {$_.FeatureName -match "IIS-" -and $_.State -eq [Microsoft.Dism.Commands.FeatureState]::Disabled} | % {Enable-WindowsOptionalFeature -Online -FeatureName $_.FeatureName}
To disable a feature use:
dism /disabe-Feature /online /featurename:IIS-IPSecurity /all
Below, You will find all the available features on Windows Nano Server 2016 IIS Server
- IIS-WebServer
- IIS-CommonHttpFeatures
- IIS-StaticContent
- IIS-DefaultDocument
- IIS-DirectoryBrowsing
- IIS-HttpErrors
- IIS-HttpRedirect
- IIS-ApplicationDevelopment
- IIS-CGI
- IIS-ISAPIExtensions
- IIS-ISAPIFilter
- IIS-ServerSideIncludes
- IIS-WebSockets
- IIS-ApplicationInit
- IIS-Security
- IIS-BasicAuthentication
- IIS-WindowsAuthentication
- IIS-DigestAuthentication
- IIS-ClientCertificateMappingAuthentication
- IIS-IISCertificateMappingAuthentication
- IIS-URLAuthorization
- IIS-RequestFiltering
- IIS-IPSecurity
- IIS-CertProvider
- IIS-Performance
- IIS-HttpCompressionStatic
- IIS-HttpCompressionDynamic
- IIS-HealthAndDiagnostics
- IIS-HttpLogging
- IIS-LoggingLibraries
- IIS-RequestMonitor
- IIS-HttpTracing
- IIS-CustomLogging