常用的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

posted @ 2015-05-24 16:26  美酒与歌  阅读(392)  评论(0编辑  收藏  举报