Skip to content

Instantly share code, notes, and snippets.

@uialberto
Created May 30, 2020 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uialberto/c930ef993c9d6e8514c3a1236675079f to your computer and use it in GitHub Desktop.
Save uialberto/c930ef993c9d6e8514c3a1236675079f to your computer and use it in GitHub Desktop.
Instalacion IIS Web Server por Console
@echo off
REM Install IIS-WebServer
dism /online /get-featureinfo /featurename:IIS-WebServer | find "Deshabilitado" > nul
if %ERRORLEVEL% == 0 (
echo "IIS Web Server no esta instalado. Instalando..."
dism /online /enable-feature /featurename:IIS-WebServer /all
)
REM Install IIS-ASPNET45
dism /online /get-featureinfo /featurename:IIS-ASPNET45 | find "Deshabilitado" > nul
if %ERRORLEVEL% == 0 (
echo "IIS-ASPNET45 no esta instalado. Instalando..."
dism /online /enable-feature /featurename:IIS-ASPNET45 /all
)
REM Remove IIS-HealthAndDiagnostics
dism /online /get-featureinfo /featurename:IIS-HealthAndDiagnostics | find "Habilitado" > nul
if %ERRORLEVEL% == 0 (
echo "IIS-HealthAndDiagnostics esta instalado. Desinstalando..."
dism /online /disable-feature /featurename:IIS-HealthAndDiagnostics
)
REM Remove IIS-HttpLogging
dism /online /get-featureinfo /featurename:IIS-HttpLogging | find "Habilitado" > nul
if %ERRORLEVEL% == 0 (
echo "IIS-HttpLogging esta instalado. Desinstalando..."
dism /online /disable-feature /featurename:IIS-HttpLogging
)
ECHO IIS-WebServer
dism /online /get-featureinfo /featurename:IIS-WebServer | find "Estado"
ECHO IIS-ASPNET45
dism /online /get-featureinfo /featurename:IIS-ASPNET45 | find "Estado"
ECHO IIS-HealthAndDiagnostics
dism /online /get-featureinfo /featurename:IIS-HealthAndDiagnostics | find "Estado"
ECHO IIS-HttpLogging
dism /online /get-featureinfo /featurename:IIS-HttpLogging | find "Estado"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment