website - Powershell Script Changed Site to New App Pool in the GUI, but not in the Advanced Properties -


i'm running w2k8 r2 web server multiple applications in each app pool. had move sites 1 app pool another, ran script:

import-module webadministration get-content c:\applications.txt | foreach-object {set-itemproperty –path “iis:\sites\default web site\$_" applicationpool –value pool02} 

the result applications changed viewed in gui. when right click pool list it's been correctly moved. however, when drill advanced settings of application itself, application pool value hasn't changed , it's still running in old pool , using memory though doesn't show in gui.

any ideas?

if have app in destination pool can this:

import-module webadministration get-content c:\applications.txt | foreach-object {     $destapppool = (get-spwebapplication <any app in desired destination pool>).applicationpool     $webapp = get-spwebapplication "iis:\sites\default web site\$_"     $webapp.applicationpool = $destapppool     $webapp.provisionglobally()     $webapp.update() } iisreset 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -