Created
October 1, 2018 02:59
-
-
Save JeremyMorgan/5f5ca70db82bd645d891c1aedd4e1d2b to your computer and use it in GitHub Desktop.
Quick batch file to install IIS if it's not installed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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