GodsCrimeScene
GodsCrimeScene

Reputation: 1270

Get site url(s) that wsp is deployed to

Is it possible to get a list of sites that a given .wsp is deployed to? For my uninstall script I need to retract and remove certain wsps that have been deployed, but I do not know the exact url that they have been deployed to.

Current Script:

uninstall-spsolution -identity mysolution.wsp -webapplication $url -confirm:$false

Upvotes: 2

Views: 2867

Answers (1)

Vadim Gremyachev
Vadim Gremyachev

Reputation: 59358

You could use Get-SPSolution cmdlet for that purpose.

The following script returns the list of web applications (url property) where a given package is deployed to:

$solution = Get-SPSolution -Identity $solutionName 
$solution.DeployedWebApplications | Format-Table -Property Url

Upvotes: 2

Related Questions