Customers wishing to migrate from VisualSP Classic to our more modern solution will need to collect some information about how the VisualSP system is currently being used in your SharePoint farm.
This information can be used to assess what help items need to be recreated and / or replaced in the new system. The CSV files generated here could provide raw data to be used in conjunction with our Bulk Help Item Uploading Tool to automate the process for many items.
Finding all VisualSP ‘Provider’ site collections and exporting their help items
This PowerShell script will find any sites where the site owners may have created their own VisualSP help items – and export those items into a CSV file for that site. This will help us get a larger view of custom help items and do some appropriate planning.
cls
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
$webApps = Get-SPWebApplication
Foreach($webApp in $webApps)
{
Foreach($site in $webApp.Sites)
{
$feature = Get-SPFeature -Site $site | Where-Object {$_.Id -eq "e4af74b6-7610-4499-adfe-e3eab45b6450"}
if($feature -ne $null)
{
Write-Host $site.RootWeb.Url " - Activated"
$web = Get-SPWeb $site.Url
$string = $web.Title
$webName = $string -replace '[\W]', ''
write-host $webName
$list = $web.Lists['VisualSP Help Items']
$itemCount = $list.Itemcount
Write-Host $itemCount " help items"
if($itemCount -gt 0)
{
$query = New-Object Microsoft.SharePoint.SPQuery
$query.ViewXml = @"
<View Scope='Recursive'>
<Query>
<OrderBy><FieldRef Name='ID' Ascending='TRUE'/></OrderBy>
</Query>
</View>
"@
$ListItems = $List.GetItems($query)
$ListItemCollection = @()
$ListItems | ForEach {
$ExportItem = New-Object PSObject
Foreach($Field in $_.Fields)
{
$ExportItem | Add-Member -MemberType NoteProperty -name $Field.InternalName -value $_[$Field.InternalName]
}
$ListItemCollection += $ExportItem
}
#Export the result Array to CSV file
$csvPath = "c:\Temp\" + $webName + ".csv"
if (Test-Path $csvPath) {
Remove-Item $csvPath
}
$ListItemCollection | Export-CSV $csvPath -NoTypeInformation -append
}
}
$site.Dispose()
$web.Dispose()
}
}