Setting `Load User Profile` to false on DefaultApp

2019-07-07 08:17发布

问题:

Is there an appcmd for setting Load User Profile to false on DefaultAppPool on IIS7 via appcmd?

I have already tried this

%systemroot%\system32\inetsrv\appcmd set config -section:applicationPools /[name='DefaultAppPool'].processModel.loadUserProfile:false

But this only sets it for the defualt App Pool and doesnt change the main setting called "

Set Application pool defaults..."

回答1:

You can do this with the following:

c:\windows\system32\inetsrv\appcmd.exe set config -section:applicationPools "/[name='appPoolNameGoesHere'].processModel.loadUserProfile:false"

c:\windows\system32\inetsrv\appcmd.exe set config -section:applicationPools "/[name='appPoolNameGoesHere'].processModel.loadUserProfile:true"


标签: iis iis-7