Tag Archives: IIS

APPCMD: IIS Over Console

When we do remote deployment what more convenient than a console? Once I got an opportunity to remotely deploy the web application along with supporting subsystems. Therefore I need a batch file to automate the whole deployment procedure.

One of the requirement is to setup IIS with new app pool, create VD and deploy the files needed to run the website. Following is the command to manage IIS over command prompt;

APPCMD
  1. To list all existing app pool from IIS use
    APPCMD LIST APPPOOL
  2. To create a new app pool then use
    APPCMD ADD APPPOOL /NAME:<NAME_OF_APPPOOL>
  3. To create app pool with integrated pipeline use
    APPCMD ADD APPPOOL /NAME:<NAME_OF_APPPOOL> /MANAGEDPIPELINEMODE:”Integrated”
  4. To create app pool with specific .NET version, use
    APPCMD ADD APPPOOL /NAME:<NAME_OF_APPPOOL> /MANAGEDRUNTIMEVERSION:”v4.0″.
  5. In this case I am using .NET Framework 4.0
  6. To enable 32-bit dlls use the flag
    /ENABLE32BITAPPONWIN64:”true”
  7. To finally create the site,
    APPCMD ADD APP /SITE.NAME:”Default Web Site” /PATH:/<VD_NAME> /PHYSICALPATH:<PHYSICAL_PATH_TO_VD> /APPLICATIONPOOL:<APP_POOL_NAME>

 

 

Advertisements