Retrieve Details of Deployed Solutions in SharePoint using PowerShell

MagicAndi picture MagicAndi · Jan 21, 2010 · Viewed 15.1k times · Source

I need to retrieve the details of all deployed SharePoint solutions, as are displayed in the Central Administration > Operations > Solution Management (AKA the Solution Store), using a PowerShell script (v2.0). Can anyone offer any guidance on how to retrieve this information from the SharePoint solution store via the SharePoint API?

Thanks, MagicAndi.

Answer

Mitchell Skurnik picture Mitchell Skurnik · Feb 17, 2010

This is actually pretty easy to do. You conect to the SP Farm and just request get_Solutions.

Here is an example:

# Connect to the Farm
$SPfarm = [Microsoft.SharePoint.Administration.SPFarm]::get_Local()

# What Solution are we looking for?
$solution = "sharepointlearningkit.wsp";

# Get the solutions
$currentSolution = $SPfarm.get_Solutions() | Where-Object { $_.DisplayName -eq $solution; }
$currentSolution;