有人可以告诉我如何(或指出正确的方向)我可以创建一个应用程序池并设置一个应用程序以使用命令行使用新创建的池吗?应用程序已添加到 IIS,但需要创建一个新池并将其用于此新应用程序。
问问题
2375 次
1 回答
5
这是我收集的,以防其他人正在寻找同样的东西:
rem // Creates a new application pool called MyAppPool
CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\ADSUTIL.VBS CREATE w3svc/AppPools/MyAppPool IIsApplicationPool
rem // if running under different user name and password
rem CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\ADSUTIL.VBS SET w3svc/AppPools/MyAppPool/WamUserName "domain\username"
rem CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\ADSUTIL.VBS SET w3svc/AppPools/MyAppPool/WamUserPass "pass"
rem CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\ADSUTIL.VBS SET w3svc/AppPools/MyAppPool/AppPoolIdentityType 3
========================================
rem // create a new virtual directory (creates vdir "Test" and set it to D:\WebSites\MyWebSite
CSCRIPT %SystemRoot%\system32\iisvdir.vbs /Create W3SVC/1/ROOT Test D:\WebSites\MyWebSite
=================================
rem // assign MyAppPool to "Test" web site
CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\ADSUTIL.VBS SET W3SVC/1/ROOT/Test/AppPoolId MyAppPool
于 2013-09-20T20:07:45.703 回答