现在的位置: 首页 > 综合 > 正文

使用SharePoint Management PowerShell来完成对SharePoint的操作

2011年04月21日 ⁄ 综合 ⁄ 共 431字 ⁄ 字号 评论关闭

 

    用户可以使用SharePoint Management PowerShell来完成对SharePoint的操作了。

  这里我们以site的Import和Export作例子,来简单介绍怎么用PowerShell完成上述操作。我们知道,我们在对Site作backup和restore时,有2种选择,一种是直接用Backup,restore命令,这样是对整个site collection作备份还原操作,然而当我们只是备份还原某个site或者是某个list的时候,Import和Export成了我们的选择。

  首先将源site 作export,在PowerShell窗口输入

以下是代码片段:
Export-SPWeb http://aa/ targetsite url –Path "//192.168.1.100/aa/moss2010.cmp”

 

Import-SPWeb http://aa1/  –path C:\aa\moss2010.cmp

 

完成site的import。

  

 

抱歉!评论已关闭.