# Name:            Remove-WebApplicataionPool.ps1 
# Description:     This script will delete SP WebApplication Pools from SP/IIS 
# Usage:        Run the function with a required parameters 
# By:             Ivan Josipovic, Softlanding.ca 
Function Remove-WebApplicataionPool($ApplicationPoolName){ 
    $apppool = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.ApplicationPools | where {$_.Name -eq $ApplicationPoolName} 
    if ($apppool -eq $null){ 
        write-host -foreground red "The Application Pool $ApplicationPoolName does not exist!" 
        return 1 
    write-host -foreground green "$ApplicationPoolName has been deleted" 
    return 0 
Remove-WebApplicataionPool -ApplicationPoolName "SharePoint - 8003" 


Powershell has the ability to delete SP Service Application pools using the get-spserviceappication pool command. However,this only covers the Service Application Pools and not the Web Application Pools. I have not found a way to do this through the GUI other than IIS Manager which is not supported.


This script will take an SP WebApplication Pool name as a parameter and remove it from the farm.


Use this script to change the Web Application Pools: