SharePoint 2010: Using PowerShell to create Web Application Pool

You can use the following PowerShell code to create a new Application Pool for your SharePoint site

$svc = [Microsoft.SharePoint.Administration.SpWebService]::ContentService
$pool = New-Object Microsoft.SharePoint.Administration.SPApplicationPool "SharePoint App Pool", $svc
$pool.CurrentIdentityType = "SpecificUser"
$acct = Get-SPmanagedAccount DOMAIN\USER
$processAcct = [Microsoft.SharePoint.Administration.SPProcessAccount]::LookupManagedAccount($acct.Sid)
$pool.ProcessAccount = $processAcct

The application pool will be created.

You can update an existing application’s application pool followed by this script:

$webApp = Get-SPWebApplication http://web
$webApp.ApplicationPool = $pool


You can also switch a web application’s application pool to another by using the following PowerShell Script

$sourceWebAppPool = (Get-SPWebApplication http://web1).ApplicationPool
$webApp = Get-SPWebApplication http://web2
$webApp.ApplicationPool = $sourceWebAppPool

Read More

How to make document library web part in top level visible to subsites

here is a solution from Anton Khritonekov

“There are another option without such hard coding. You can open any view of your document library, as mentioned earlier AllItems.aspx for example with SharePoint Designer. Open it for editing in advanced mode (there are option when you click right mouse button on file in SP Designer). Then just point mouse cursor inside web part and chose in ribbon web parts, Add to Site gallery, see the picture. Fill in name of new web part. That is all, now you can add this web part on any page on any web site from webpart gallery through the user interface or through the SP Designer by clicking Insert, Web Part in the ribbon on any page.”

Read More