2013-07-03 207 views
3

有人可以讓我知道如何(或指向我正確的方向)我可以創建應用程序池並設置應用程序以使用新創建的池使用命令行?應用程序已經添加到IIS中,但需要創建一個新池並將其用於此新應用程序。創建IIS 6應用程序池

回答

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