自己收藏的一些SharePoint的命令

恢复备份站点
Restore-SPSite -Identity http://xxx.xxx.com:9001/sites/IT -Path C:\SPDemo\WebSite\mike\mike.bak


添加wsp文件
Add-SPSolution C:\SPTESCO\xxx.SharePoint.wsp


发布wsp文件


Farm级别:Install-SPSolution -Identity xxx.wsp -GACDeployment -Force


指定Application:Install-SPSolution -Identity xxx.wsp -WebApplication http://xxx -GACDeployment -Force


所有webapplication:Install-SPSolution –Identity xxx.wsp -AllWebApplications -GACDeployment -Force


更新wsp文件
Update-SPSolution -Identity xxx.Portal.wsp -LiteralPath E:\SPDemo\WebSite\xxx.wsp -GACDeployment -force


卸载wsp文件
Uninstall-SPSolution -Identity mike.pages_1.wsp -confirm:$false


移除wsp文件


Remove-SPSolution -Identity xxx.wsp


激活Feature


Enable-SPFeature -Identity "FeatureFolderName" -Url http://thq-poc-moss


禁用feature


Disable-SPFeature -Identity "FeatureFolderName"-Url http://thq-poc-moss


卸载Feature


Uninstall-SPFeature -Identity "FeatureFolderName"




部署wsp步骤:
1. 加载wsp文件,Add-SPSolution
2. 部署wsp文件,Install-SPSolution
3. 激活feature, Enable-Feature


卸载wsp步骤:
1. 禁用Feature, Disable-SPFeature
2. 卸载Feature, Uninstall-SPFeature
3. UnDeploy wsp文件,Uninstall-SPSolution
4. 移除wsp文件,Remove-SPSolution

你可能感兴趣的:(SharePoint)