Skip to content

Instantly share code, notes, and snippets.

@JeremyMorgan
Created October 1, 2018 02:59
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Quick batch file to install IIS if it's not installed
@ECHO OFF
dism /online /get-featureinfo /featurename:IIS-WebServer | find "State : Disabled" > nul
if %ERRORLEVEL% == 0 (
echo "IIS Web Server is not installed"
dism /online /enable-feature /featurename:IIS-WebServer /all
)
dism /online /get-featureinfo /featurename:IIS-WebServer | find "State"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment