Return to Snippet

Revision: 34824
at October 28, 2010 20:12 by scholli

Initial Code
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction "SilentlyContinue"
$SolutionPackageName = "MySolution.wsp" 
$solution = Get-SPSolution | where-object {$_.Name -eq $SolutionPackageName}

# check to see if solution package has been installed
if ($solution -ne $null) {
# check to see if solution package is currently deployed
if($solution.Deployed -eq $true){
   Uninstall-SPSolution -Identity $SolutionPackageName -Local -Confirm:$false

Initial URL

Initial Description

Initial Title
Retract and Uninstall SharePoint Solution via Powershell

Initial Tags

Initial Language
Windows PowerShell