Easy Steps to migrate from Telligent CS to SP Online
Telligent Community is a community platform that provides an integrated suite of modern community applications such as forums, blogs, wikis, media galleries, and calendars with a fully customised user experience and Restful platform APIs
SharePoint Online is a cloud-based service that helps organisations share and collaborate with colleagues, partners, and customers. With SharePoint, you can access internal sites, documents, and other information from anywhere
1) Map Wiki Pages, Forums, Threads, PostsAttachment to FileStorage sub-folders.
2) Export Wiki Pages, Forums, Threads, Posts related to Discussion and its attachment(link of Files) in to CSV files by using Power shell script From Telligent Community Site.
3) Import Wiki Pages into Site Pages, (Categories, Editors, Tags, Ratings) into List, Post Attachments like PDF, image, docs into Libraries In to SharePoint Online.
1) Mapping:
Important Tables
Web Pages --> cs_Wiki_Pages (table) -> Title, Formatted Body (Major columns) --> User Id, Page Id, Wiki Id, Parent Page Id (Reference Column)
Page edit History -> cs_Wiki_PageRevisions (table) -> Post Author, User Id, Page Id, Wiki Id, Parent Page Id (Reference Column)
Users -> cs_Users (table) -> User Id, User Name, Membership Id
User Information -> cs_UserProfile --> User Profile Id, User Id
Site Information -> [cs_Wiki_Wikis] -> Wiki Id, Group Id,
Group -> cs_Groups -> Group Id
Categories -> cs_Wiki_PageTags -> Page Id, Group Id, TagId
Forum -> te_Forum_Forums -> ForumId, Thread Id
Threads -> te_Forum_Threads -> Thread Id
Posts -> cs_Posts -> Post Id, User Id, Thread Id
Rating on Discussion -> cs_Wiki_PageRatings -> PageId, PageRatingId
Important File and Folders
Web\filestorage\CommunityServer.Components.MultipleUploadFileManager
Web\filestorage\CommunityServer.Components.PostAttachments
Web\filestorage\CommunityServer.Wikis.Components.Files
Web\filestorage\telligent.evolution.components.attachments
//Same Files from MultipleUploadFileManager but in fixed size and format
Web\filestorage\CommunityServer.Components.ImageFileViewer\CommunityServer\Wikis\Components\Files
Web\filestorage\CommunityServer.Components.ImageFileViewer\CommunityServer\Discussions\Components\Files
2) Get data from table (List) by SQL query, loop by using Id, map with Folder (Library) in power-shell script and export in to CSV
Export Wiki Pages which is mapped with Folders
clear
$ClientCSVPath = "C:\Users\$env:UserName\Documents\WikiPages.csv"
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection
$SqlConnection.ConnectionString = "Data Source=.;Initial Catalog=DataBaseName;Integrated Security=true;TrustServerCertificate=True"
$SqlCmd = New-Object System.Data.SqlClient.SqlCommand
$SqlCmd.CommandText = "SELECT P.PageId, U.UserId,U.UserName AS Editor, G.Name as Category, WT.NameLowerCase AS Tags, WPR.Rating, P.Title ,
CAST(P.FormattedBody as Varchar(8000)) AS Body, P.LastModifiedUtcDate AS ModifiedDate FROM [DataBaseName].[dbo].[cs_Wiki_Pages] P
INNER JOIN [DataBaseName].[dbo].[cs_Users] U ON P.UserId=U.UserID
LEFT OUTER JOIN [DataBaseName].[dbo].[cs_Wiki_Wikis] WW ON WW.WikiId = p.WikiId
LEFT OUTER JOIN [DataBaseName].[dbo].[cs_Groups] g ON G.GroupID = WW.GroupId
LEFT OUTER JOIN [DataBaseName].[dbo].[cs_Wiki_PageTags] WPT ON P.PageId = WPT.PageId
LEFT OUTER JOIN [DataBaseName].[dbo].[cs_Wiki_Tags] WT ON WPT.TagId = WT.TagId
LEFT OUTER JOIN [DataBaseName].[dbo].[cs_Wiki_PageRatings] WPR ON WPR.PageId = P.PageId"
$SqlCmd.Connection = $SqlConnection
$SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
$SqlAdapter.SelectCommand = $SqlCmd
$DataSet = New-Object System.Data.DataSet
$SqlAdapter.Fill($DataSet)
$dataTable = new-object System.Data.DataTable "PostInfo"
$dataTable = $dataSet.Tables[0]
$dataTable.Columns.Add("FileLink","string")
foreach ($Row in $dataTable.Rows)
{
$listDirectoryName = Get-ChildItem -Path "M:\DynamicsCRM\Telligent\Web\filestorage\CommunityServer.Components.MultipleUploadFileManager" -Recurse -Directory | Where-Object { $_.Name -eq $Row.UserId } | Select-Object FullName
foreach($DirectoryPath in $listDirectoryName)
{
$Row.FileLink = Get-ChildItem -Path $DirectoryPath.FullName -Recurse | Select-Object FullName
}
}
$dataTable | export-csv $ClientCSVPath -NoTypeInformation
write "Wiki Page Revision with body successfully exported in to " $ClientCSVPath
Export Wiki Page Revisions
clear
$ClientCSVPath = "C:\Users\$env:UserName\Documents\WikiPageRevision.csv"
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection
$SqlConnection.ConnectionString = "Data Source=.;Initial Catalog=DataBaseName;Integrated Security=true;TrustServerCertificate=True"
$SqlCmd = New-Object System.Data.SqlClient.SqlCommand
$SqlCmd.CommandText = "SELECT PR.PageRevisionId AS PostID, U.UserName AS PostAuthor, PR.UserId, PR.Title AS Subject, CAST(PR.FormattedBody as Varchar(8000)) AS Body, PR.LastModifiedUtcDate AS PostDate
FROM [DataBaseName].[dbo].[cs_Wiki_PageRevisions] PR INNER JOIN [DataBaseName].[dbo].[cs_Users] U ON PR.UserId=U.UserID "
$SqlCmd.Connection = $SqlConnection
$SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
$SqlAdapter.SelectCommand = $SqlCmd
$DataSet = New-Object System.Data.DataSet
$SqlAdapter.Fill($DataSet)
$dataTable = new-object System.Data.DataTable "PostInfo"
$dataTable = $dataSet.Tables[0]
$dataTable | export-csv $ClientCSVPath -NoTypeInformation
write "wiki Page Revision with body successfully exported in to " $ClientCSVPath
Export Telligent Users map it to AD
clear
$ClientCSVPath = "C:\Users\$env:UserName\Documents\WikiADUsersTest1.csv"
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection
$SqlConnection.ConnectionString = "Data Source=.;Initial Catalog=DataBaseName;Integrated Security=true;TrustServerCertificate=True"
$SqlCmd = New-Object System.Data.SqlClient.SqlCommand
$SqlCmd.CommandText = "SELECT UserId, UserName,Email, CommonName FROM [DataBaseName].[dbo].[cs_Users]"
$SqlCmd.Connection = $SqlConnection
$SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
$SqlAdapter.SelectCommand = $SqlCmd
$DataSet = New-Object System.Data.DataSet
$SqlAdapter.Fill($DataSet)
$dataTable = new-object System.Data.DataTable "PostInfo"
$dataTable = $dataSet.Tables[0]
$dataTable.Columns.Add("ADUsers","string")
foreach ($Row in $dataTable.Rows)
{
$Row.ADUsers = Get-ADUser -Filter * -SearchBase "OU=Public Users,OU=XYZ Public,DC=YourDomain,DC=YourDC,DC=xyz" | Where $Row.UserName -like 'UserPrincipalName' | Select GivenName
}
$dataTable | export-csv $ClientCSVPath -NoTypeInformation
write "Wiki Users mapped to AD Users successfully exported in to " $ClientCSVPath
3) Create Lists with below names: (It is recommended to create list in SP for all tables of Telligent community DB server)
Wiki_Pages, Wiki_PageRevisions, Users , UserProfile , Wiki_Wikis, Groups, Wiki_PageTags, Forum_Forums, Forum_Threads, Posts ,Wiki_PageRatings
Create Library with below names: (It is recommended to create library for all root folder of Web\filestorage\)
MultipleUploadFileManager, PostAttachments, Components Files,Components attachments
4) Import data from csv into SP lists and libraries
Comments
Post a Comment