Created
June 6, 2014 12:09
-
-
Save joebuschmann/2b87280535cdcc1d9b41 to your computer and use it in GitHub Desktop.
A batch script that builds out a website, virtual directory, application, and app pool using AppCmd.exe
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
CD %systemroot%\system32\inetsrv | |
REM Add a new site and enable Windows authentication | |
MKDIR C:\Blogs | |
APPCMD add site /name:Blogs /bindings:"http/*:81:" /physicalPath:"C:\Blogs" | |
APPCMD set config "Blogs" -section:system.webServer/security/authentication/windowsAuthentication /enabled:"True" /commit:apphost | |
REM Create a virtual directory | |
MKDIR C:\Blogs\Technology | |
APPCMD add vdir /app.name:"Blogs/" /path:/Technology /physicalPath:C:\Blogs\Technology | |
REM Create an app pool qualified by the virtual directory name | |
APPCMD add apppool /name:Technology.JoeBuschmann | |
REM Configure the app pool | |
APPCMD set apppool "Technology.JoeBuschmann" /managedRuntimeVersion:v4.0 /processModel.pingingEnabled:false /processModel.identityType:NetworkService | |
REM Create the application | |
MKDIR C:\Blogs\Technology\JoeBuschmann | |
APPCMD add app /site.name:"Blogs" /path:/Technology/JoeBuschmann /physicalPath:C:\Blogs\Technology\JoeBuschmann | |
REM Configure the application | |
APPCMD set app "Blogs/Technology/JoeBuschmann" /applicationPool:Technology.JoeBuschmann | |
IISRESET | |
PAUSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment