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