DNK Gif

Dot Net Knowledge

Labels

Sunday, 11 September 2016

Enable/Install IIS in your System or Server by just running the batch file

IIS installation using batch file



Ease your IIS installation in any system or server just by running the batch file as Administrator. Here goes the series of commands to enable all the features in IIS by just a single click. You can remove any line of command if that feature is not needed for you.

%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-WebServerRole
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-WebServer
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-CommonHttpFeatures
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-HttpErrors
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-HttpRedirect
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-ApplicationDevelopment
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-NetFxExtensibility
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-HealthAndDiagnostics
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-HttpLogging
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-LoggingLibraries
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-RequestMonitor
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-HttpTracing
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-Security
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-URLAuthorization
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-RequestFiltering
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-IPSecurity
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-Performance
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-HttpCompressionDynamic
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-WebServerManagementTools
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-ManagementScriptingTools
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-IIS6ManagementCompatibility
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-Metabase
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-HostableWebCore
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-StaticContent
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-DefaultDocument
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-DirectoryBrowsing
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-WebDAV
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-ISAPIExtensions
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-ISAPIFilter
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-ASPNET
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-ASP
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-CGI
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-ServerSideIncludes
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-CustomLogging
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-BasicAuthentication
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-HttpCompressionStatic
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-ManagementConsole
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-ManagementService
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-WMICompatibility
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-LegacyScripts
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-LegacySnapIn
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-FTPServer
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-FTPSvc
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-FTPExtensibility
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-WindowsAuthentication
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-DigestAuthentication
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-ClientCertificateMappingAuthentication
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-IISCertificateMappingAuthentication
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:IIS-ODBCLogging
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:NetFx3
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:WCF-HTTP-Activation
%windir%\system32\dism.exe /online /quiet /enable-feature /featurename:WCF-NonHTTP-Activation
%windir%\system32\shutdown.exe /r /t 30 /c "System Restart is required for IIS installation to take effect."


Copy all these command and paste in a notepad file and save it as .bat file and your batch file is ready or you can download the batch file from here.