标签:pop deploy dem mod 保存 article art else count
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 解决方式
标签:pop deploy dem mod 保存 article art else count
原文地址:http://www.cnblogs.com/claireyuancy/p/6897067.html