标签:powershell 解决方案
function Uninstall-AllSPSolutions { param ( [switch] $Local, [switch] $Confirm ) Start-SPAssignment -Global; foreach($solution in (Get-SPSolution | Where-Object { $_.Deployed })) { write-host "Uninstalling Solution " $solution.Name; if($solution.DeployedWebApplications.Count -gt 0) { Uninstall-SPSolution $solution –AllWebApplications -Local:$Local -Confirm:$Confirm; } else { Uninstall-SPSolution $solution -Local:$Local -Confirm:$Confirm; } do { Start-Sleep 5; $solution = Get-SPSolution $solution; } while($solution.JobExists -and $solution.Deployed) } Stop-SPAssignment -Global; } function Remove-AllSPSolutions { param ( [switch] $Confirm ) Get-SPSolution | Where-Object { !$_.Deployed } | Remove-SPSolution -Confirm:$Confirm }使用方法:
..\Remove-AllSPSolutions.ps1你可以使用下面命令卸载所有部署的解决方案:
Uninstall-AllSPSolutions -Confirm然后移除它们:
Remove-AllSPSolutions -Confirm
通过PowerShell卸载所有的SharePoint 2010 解决方案,布布扣,bubuko.com
通过PowerShell卸载所有的SharePoint 2010 解决方案
标签:powershell 解决方案
原文地址:http://blog.csdn.net/crazygolf/article/details/37929451