您的位置:首页 > 其它

通过批处理文件修改IIS应用程序池的Process Model

2013-04-17 10:53 218 查看
原文出处: /article/11592413.html

Change IIS Application Pool Identity Type

@echo off

if "%1" == "" goto :ALert

if "%1" == "/?" goto :ALert

@set ProcessModelIndentyType=%~1

echo ProcessModelIndentyType=%ProcessModelIndentyType%

echo========================================================

echo Change the application pool process model identity type

echo========================================================

%windir%/system32/inetsrv/appcmd.exe set AppPool DefaultAppPool -processModel.identityType:%ProcessModelIndentyType%

%windir%/system32/inetsrv/appcmd.exe set AppPool "ASP.NET v4.0" -processModel.identityType:%ProcessModelIndentyType%

%windir%/system32/inetsrv/appcmd.exe set AppPool "ASP.NET v4.0 Classic" -processModel.identityType:%ProcessModelIndentyType%

%windir%/system32/inetsrv/appcmd.exe set AppPool "Classic .NET AppPool" -processModel.identityType:%ProcessModelIndentyType%

%windir%/system32/inetsrv/appcmd.exe set AppPool NexusIntegratedAppPool -processModel.identityType:%ProcessModelIndentyType%

%windir%/system32/inetsrv/appcmd.exe set AppPool NexusIsapiAppPool -processModel.identityType:%ProcessModelIndentyType%

Echo restart the IIS service

iisreset

goto :EOF

:ALert

Echo " Pleae input you AppPool name"

Echo " Format:"

Echo " %windir%/system32/inetsrv/appcmd.exe set AppPool <AppPoolName> -processModel.identityType:<ProcessModelIndentyType>"

Echo " ProcessModelIndentyType should be in follows:"

Echo ----ApplicationPoolIdentity

Echo ----NetworkService

Echo ----LocalService

Echo ----LocalSystem

goto :EOF

:EOF

stop
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: