I'm performing an inventory and I need to get list of sharepoint solutions (*.wsp) deployed to every individual web-application and ideally, it would also be great to list what Application pool on what web-server this web-application belongs to?

Something like this >>

solution-name.wsp / web-application-name / application-pool-name

I've tried using Get-SPSolution, but output doesn't contain web-app name & Get-SPWebApplication doesn't give the list of .wsp for each web-app listed.

stsadm -o enumsolutions seems to contain info I need, but don't know how to change output format to something similar mentioned above.

This is MS SharePoint Server 2010 running on W2K8R2 STD.

1 Answer 1


First, get all your web applications and iterate through them. While in the loop print web application name and application pool name. Last, iterate all solutions and print their names - like this:

$contentWebAppServices = (Get-SPFarm).services |
 ? {$_.typename -eq "Microsoft SharePoint Foundation Web Application"}

foreach($webApp in $contentWebAppServices.WebApplications)
    Write-Host "Web Application  : " $webApp.name
    Write-Host "Application Pool : " $webApp.ApplicationPool.Name

    Get-SPSolution | ForEach-Object {
        if ($_.LastOperationDetails.IndexOf($webApp.url) -gt 0) 
            Write-Host "    Solutions:"
            Write-Host "   " $_.DisplayName

The output looks like this:

Web Application  :  SharePoint - 1337
Application Pool :  SharePoint - 1337
Web Application  :  SharePoint - 80
Application Pool :  SharePoint - 80

The first web application (SharePoint - 1337) doesn't have deployed solutions, but the second (SharePoint - 80) has one.

  • 1
    Perfect, I think this is what I need. Commented Apr 10, 2013 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.