View Complete Thread
  • Re: Application pools

    Jul 08, 2008 02:57 AM|sergeia|LINK

    You have to set property applicationPool on application object to the name of pool you want to handle this app. If you want to do this for a site, strictly speaking,  you have to do this for the root application, but in our namespace we hide root applications and site objects have this property mapped from their root applications, so you could set it on site.

    It is pretty simple and we decided not to make a separate cmdlet for this. There is no explicit connection from application pool to an application, what you see in output in Applications column is result of script block execution query that is defined as script property for application pool view. So to add application to the app pool run:

    set-itemproperty iis:\sites\yourSite\yourAppName -name applicationPool -value yourPool

    set-itemproperty iis:\sites\yourSite -name applicationPool -value yourPool

    Replace "iis:\sites\yourSite" or "iis:\sites\yourSite\yourAppName" by the path to your site or to your application, and "yourPool" by the name of your target application pool.

    --Sergei