Powershell 将旧Sharepoint列表导出到新Sharepoint

Powershell 将旧Sharepoint列表导出到新Sharepoint,powershell,sharepoint-2010,sharepoint-2013,Powershell,Sharepoint 2010,Sharepoint 2013,是否可以在2013 Sharepoint服务器上导出Sharepoint 2010列表? 我希望能够将2010年网站列表中的内容导出到csv文件中,然后使用PowerShell将其导入2013年网站列表中 运行脚本时,我收到一个: Get-SPWeb : Cannot find an SPSite object that contains the following Id or Url:" error. 在Microsoft.SharePoint.PowerShell中添加PSSnapin-E

是否可以在2013 Sharepoint服务器上导出Sharepoint 2010列表? 我希望能够将2010年网站列表中的内容导出到csv文件中,然后使用PowerShell将其导入2013年网站列表中

运行脚本时,我收到一个:

Get-SPWeb : Cannot find an SPSite object that contains the following Id or Url:" error.
在Microsoft.SharePoint.PowerShell中添加PSSnapin-ErrorAction SilentlyContinue
#上网
$web=获取SPWeb-标识“http://www.test2010.com/site/"
#获取目标列表
$list=$web.Lists[“我的列表”]
#用于保存结果的数组-PSObject
$ListItemCollection=@()
#获取状态为“正在进行”的所有列表项
$list.Items |其中对象{$[“ID”]-ge 1}| foreach{
$ExportItem=新对象PSObject
$ExportItem |添加成员-成员类型NoteProperty-名称“Title”-值$\[“Title”]
$ExportItem |添加成员-成员类型NoteProperty-名称“ID”-值$\u[“ID”]
#将具有属性的对象添加到数组中
$ListItemCollection+=$ExportItem
}
#将结果数组导出到CSV文件
$ListItemCollection |导出CSV“c:\ListInfo.CSV”-NoTypeInformation
#处置web对象
$web.Dispose()

Powershell用于与SharePoint交互的服务器对象模型与Microsoft.SharePoint.Powershell管理单元只能与运行在同一服务器上的SharePoint环境交互。也就是说,需要与SharePoint场交互的任何此类Powershell脚本都需要从该场的web前端服务器执行

如果你从一个不是SharePoint农场的一部分的服务器运行PuxBar,仍然需要访问那个农场中的列表,那么可以考虑使用SharePoint的客户端对象模型。由于可以通过.NET代码访问客户端对象模型,因此仍然可以使用Powershell