0
是否可以在2013 Sharepoint服務器上導出Sharepoint 2010列表? 我希望能夠將2010網站上的列表中的內容導出爲csv文件,然後使用PowerShell將其導入2013網站的列表中。將舊的Sharepoint列表導出到較新的Sharepoint
運行腳本時,我收到一個:
Get-SPWeb : Cannot find an SPSite object that contains the following Id or Url:" error.
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#Get the Web
$web = Get-SPWeb -identity "http://www.test2010.com/site/"
#Get the Target List
$list = $web.Lists["My List"]
#Array to Hold Result - PSObjects
$ListItemCollection = @()
#Get All List items where Status is "In Progress"
$list.Items | Where-Object { $_["ID"] -ge 1} | foreach {
$ExportItem = New-Object PSObject
$ExportItem | Add-Member -MemberType NoteProperty -name "Title" -value $_["Title"]
$ExportItem | Add-Member -MemberType NoteProperty -name "ID" -value $_["ID"]
#Add the object with property to an Array
$ListItemCollection += $ExportItem
}
#Export the result Array to CSV file
$ListItemCollection | Export-CSV "c:\ListInfo.csv" -NoTypeInformation
#Dispose the web Object
$web.Dispose()