有人可以让我知道如何(或指出正确的方向)我可以创建一个应用程序池并使用命令行设置应用程序以使用新创建的池吗?应用程序已添加到 IIS,但需要创建一个新池并将其用于此新应用程序。
最佳答案
这是我收集的内容,以防其他人正在寻找相同的东西:
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
关于command-line - 创建 IIS 6 应用程序池,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/17454355/