Upgrade-SPSolution : A cmdlet which upgrades the WSP and installs any new feature added in the package
This is a Sharepoint 2010 Management Shell cmdlet, which upgrades a sharepoint solution and installs any new features added in the package.
The standard and reliable way of deploying code from development environment to production farm is through WSPs.
In the life cycle of an application, we often need some code releases as part of bug fixes or enhancements. So, we need to update the WSPs which are deployed earlier.
There are two ways of updating a WSP
1. Uninstall, Remove the solution from the farm and then reinstall the package.
2. Use the Update command and upgrade the solution with the new content in the package.
The first approach works pretty well. But when upgrading the solution using 'Update-SPSolution' cmdlet, it's recommended that the package should have the same number of files and features as the earlier one. Any new features added in the updated package will not be installed or activated after updating the solution.
Removing and reinstalling a feature might not be a feasible option in all cases.
So, here is a new cmdlet 'Upgrade-SPSolution', which updates the solution (the way Update-SPsolution does) and then installs any new feature/s added in the new package.