This gets all of the WSPs in a SharePoint farm. I used this to download all of the WSPs.
$farm = Get-SPFarm $solutions = $farm.Solutions foreach ($solution in $solutions) { $solution.SolutionFile.SaveAs("f:\temp\" + $solution.Name); }