iis 7 appcmd


add a new site

1
2
3
4
md D:\wwwroot_edmapi
net localgroup "administrators" /add msdomain1\username
net localgroup "msappaccess" /add msdomain1\username
net localgroup "IIS_IUSRS" /add msdomain1\username

add app pool

1
%windir%\system32\inetsrv\appcmd.exe add apppool /name="SiteName"

set app pool mode

1
%windir%\system32\inetsrv\appcmd.exe set apppool /apppool.name:"SiteName" /managedRuntimeVersion:"v4.0" /managedPipelineMode:"Classic" /autoStart:false

set app pool user

1
%windir%\system32\inetsrv\appcmd.exe set apppool /apppool.name:"SiteName" /processModel.identityType:"SpecificUser" /processModel.userName:"msdomain1\username" /processModel.password:"xxx"

add site

1
%windir%\system32\inetsrv\appcmd.exe add site /site.name:SiteName /physicalPath:D:\wwwroot_edmapi /bindings:http://username.yourcompany.com:80

change site pool

1
%windir%\system32\inetsrv\appcmd.exe set app SiteName/ -applicationPool:SiteName

iis 7 appcmd
https://ajasonwang.github.io/2014/11/05/iis-7-appcmd/
作者
Wang Jia
发布于
2014年11月5日
许可协议