Posted By

scholli on 10/28/10


Tagged

administration sharepoint


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

Tyster
jlaws0n


Retract and Uninstall SharePoint Solution via Powershell


 / Published in: Windows PowerShell
 

  1. Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction "SilentlyContinue"
  2. $SolutionPackageName = "MySolution.wsp"
  3. $solution = Get-SPSolution | where-object {$_\3.Name -eq $SolutionPackageName}
  4.  
  5. # check to see if solution package has been installed
  6. if ($solution -ne $null) {
  7. # check to see if solution package is currently deployed
  8. if($solution.Deployed -eq $true){
  9. Uninstall-SPSolution -Identity $SolutionPackageName -Local -Confirm:$false
  10. }
  11. }

Report this snippet  

You need to login to post a comment.