Reputation: 1270
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
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