Script: Install IIS and All Related Features

PowerShell Related Scripting Forum
User avatar
hamid
Site Admin
Posts: 15
Joined: Mon Jun 17, 2019 2:19 pm
Contact:

Script: Install IIS and All Related Features

Postby hamid Wed Jun 26, 2019 7:45 am

Hello Club!

Here is a simple script which helps you to build your IIS Server with all related features simply and quickly.

$IISfeature = "web-server","web-asp-net","web-asp-net45","web-net-ext","web-net-ext45","net-http-activation","web-common-http","web-default-doc","web-dir-browsing","web-static-content","web-http-redirect","web-dav-publishing","web-http-logging","web-health","web-custom-logging","web-request-monitor","web-http-tracing","web-performance","web-stat-compression","web-dyn-compression","web-security","web-filtering","web-basic-auth","web-ip-security","web-windows-auth","web-app-dev","web-asp","Web-cgi","web-isapi-ext","web-isapi-filter","web-includes","web-ftp-server","web-ftp-service","web-ftp-ext","web-mgmt-tools","web-mgmt-console","web-mgmt-compat","web-metabase","web-lgcy-mgmt-console","web-lgcy-scripting","web-wmi","web-scripting-tools"
install-windowsfeature -name $IISfeature
Enable-WindowsOptionalFeature -Online -FeatureName WCF-TCP-Activation45
Enable-WindowsOptionalFeature -Online -FeatureName WCF-HTTP-Activation45
Enable-WindowsOptionalFeature -Online -FeatureName WCF-TCP-PortSharing45
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpErrors
Enable-WindowsOptionalFeature -Online -FeatureName IIS-LoggingLibraries
Enable-WindowsOptionalFeature -Online -FeatureName IIS-ApplicationInit


Enjoy!
Microsoft MVP: Cloud and Datacenter Management
Info@hamidsadeghpour.net

Return to “General Scripting”

Who is online

Users browsing this forum: No registered users and 0 guests