Kirk Evans is a Microsoft Architect for the Azure Center of Excellence.
Introduction to SharePoint and Azure IaaS
Building SharePoint Apps with Windows Azure Platform as a Service
SharePoint Solutions and Architectures on Windows Azure Infrastructure Services
Understanding Authentication and Permissions with Apps for SharePoint and Office
Working with a customer, we saw that they had 20 or so web application pools, each with 1 web application each. The software boundary for SharePoint 2010 is to have no more than 10 web application pools. Because each application pool can have multiple web applications assigned to it, and easy fix is to just move the web applications to new application pools.
I have seen several blogs and even forum posts that indicate you can just change the application pool in IIS. This is not sufficient, because SharePoint maintains a reference to the application pool and the managed account assigned to the application pool. If you change it in IIS without telling SharePoint, you can cause orphaned configuration data which may prevent you from being able to apply updates or upgrades.
There’s no UI to change the application pool in Central Administration, the only way to change this is through the object model. Luckily this is pretty simple to do using PowerShell.
$webService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$pool = $webService.ApplicationPools["SharePoint - AuthTest80"]
$app = Get-SPWebApplication http://teamsapp
$app.ApplicationPool = $pool
The trick here is to use the ProvisionGlobally method. If you leave this out, it changes the setting in SharePoint’s configuration data, but does not make a change in IIS. ProvisionGlobally will make the change in IIS as well, and will do this for every server in your farm… another huge benefit for doing this through the object model instead of manually updating the setting in IIS for every server in your farm!
SharePoint Server 2010 capacity management: Software boundaries and limits
THis script fails for me on the ProvionGlobally piece. Any ides? Error below:
Exception calling "ProvisionGlobally" with "0" argument(s): "Object reference
not set to an instance of an object."
At line:1 char:2
+ CategoryInfo : NotSpecified: (:) , MethodInvocationException
+ FullyQualifiedErrorId : NullReferenceException