Google IT Solutions: How to create application pool in IIS through batch file.

Tuesday, 10 June 2014

How to create application pool in IIS through batch file.

Run notepad and type following commands

cd %windir%\system32\inetsrv
appcmd add apppool /name:Pool_Name1 /managedRuntimeVersion:v4.0 /managedPipelineMode:Classic
appcmd set apppool /apppool.name:Pool_Name1 /processModel.identityType:NetworkService
appcmd set apppool /apppool.name:Pool_Name1 /enable32BitAppOnWin64:True

Save notepad file as batch file like (Pool.bat) in C: drive at any location. Run this batch file on server where you want to create application pool



Note:
Define the attributes as per the requirements.

For example:

  • If you are using framework 4 then put following value (managedRuntimeVersion:v4.0) and if you want to use framework 2 then put following value (managedRuntimeVersion:v2.0) in batch file.
  • If you want to use identityType (NetworkService) then put (processModel.identityType:NetworkService) and if you want to use any other user you can change the value like this (processModel.identityType:administrator)



Now open IIS and see you will find your application pool there. enjoy with little bit practice.


2 comments:

  1. Hi, can u help me? I need to deploy changes to iss applications, how i can do it?

    ReplyDelete