常用的SharePoint命令行代码

网站备份:
Backup-SPSite http://sp2013 -Path C:sp.bak

网站还原:
Restore-SPSite http://sp2013 -Path C:sp.bak -Force -DatabaseServer sharepoint2010 -DatabaseName wss_content

更新Wsp包:
Update-SPSolution –Identity sp.wsp –LiteralPath C:sp.wsp –GACDeployment

查找解决方案帮助文档:
get-help install-spsolution

添加解决方案:
Add-SPSolution -LiteralPath C:sp.wsp

覆盖部署解决方案:
Install-SPSolution -Identity sp.wsp -WebApplication http://sp2013  -GACDeployment -Force

更新解决方案:
Update-SPSolution –Identity sp.wsp –LiteralPath C:sp.wsp –GACDeployment -Force

导出网站:
Export-spweb http://sp2013/spsite -Path C:sp.cmp

导入网站:
Import-SPWeb http://sp2013/spsite -Path C:sp.cmp

原文地址:https://www.cnblogs.com/wanren/p/4525992.html