Sunday, 17 November 2013

Document migration from OpenText LiveLink ECM - eDocs R/KYV 9.1 to SharePoint 2010

One of my recent engagements involved investigating the export of documents from a customised LiveLink ECM system with the intention of uploading the content into SharePoint 2010.

The Challenge

LiveLink stores documents in an Oracle database with Web site and desktop client UIs.

Documents are logically stored as nested classes and folders.

There are two internal path representations for folders in .

Documents have associated metadata which is stored various tables within the database.

Both documents and metadata need to be replicated in SharePoint.

The solution

The solution comprises of multiple components.

Export application

A custom .net windows application was designed to export the both the documents and metadata from LiveLink. The application takes various parameters, one of which is the root folder path. The application will iterate through each of the sub folder recursively. During this process a physical folder on the local file system is created for each LiveLink folder and each document is download with the metadata captured. The result is a local file system representation of the folders in LiveLink. A custom .net windows application was designed to export the both the documents and metadata from LiveLink. The application takes various parameters, one of which is the root folder path. The application will iterate through each of the sub folder recursively. During this process a physical folder on the local file system is created for each LiveLink folder and each document is download with the metadata captured. The result is a local file system representation of the folders in LiveLink.

The application utilises System.Data.OracleClient to allow direct communication with the Oracle LiveLink database. This allows the folder and file structure to be determined.

The document download has been implemented by making SOAP calls to LiveLink where the document ID is passed as a parameter. Having only limited knowledge of LiveLink and any of its APIs made this quite tricky but it is possible. I had attempted extracting the documents directly from Oracle by downloading the files as blobs but there were issues. Specifically the files were corrupted which had the result of MS Word documents losing their formatting. Not exactly what we want from and EDRM export. SOAP calls however allowed for successful download with no issues.

The metadata is captured in a csv file where there is one row entered per document. The csv file captures the location of the document on the file system, the author, the date and other metadata properties.

Once the tool has completed running there is a local copy of all the files and folders stored and a csv file containing all the captured metadata.

Import tool

My initial assumption was that I would use some PowerShell to upload the files into SharePoint. Obviously being a SharePoint geek this is where I wanted to go. However I wanted to give some flexibility to my client so that they were able to do document imports without being reliant on PowerShell knowledge. The ShareGate migration tool served the need well. This product allows a bulk up load of files and folderd complete with Metadata into SharePoint. Where the genius comes in is that you can specify an MS Excel file to act as a source for the upload. It will go through each line in the excel sheet and upload the file specified in the path with its metadata as specified in the other columns. You can map each column in excel to your column in your SharePoint content type. I have to admit I did think it would meet our need but was extremely pleased when I got it working. As was my client.

So there you go, it is possible to migrate content from LiveLink to SharePoint 2010....but lets be honest, we always knew it was deep down!



Thursday, 1 August 2013

SharePoint restrict people picker to a specific Active Directory OU Group

Another note to self here. If you want to restrict what appears in the SharePoint people picker to a specific OU in Active Directory you can using the following command:

 stsadm -o setsiteuseraccountdirectorypath -path "CN=Sales,DC=ContosoCorp,DC=local" –url http://server_name

A point of note is that it will not restrict users which are already in the site collection, only new users which are added.

More command details here:

http://technet.microsoft.com/en-us/library/cc263328(office.12).aspx

Thursday, 13 June 2013

Configure Search Scopes and Site Collection Display Groups with PowerShell

Note for myself again.

I wanted to create search scope which returned results from a specific area in my SharePoint site collection. I also wanted this scope to be available in the site collection's "Scopes drop down".

This code did the trick

$createdScope = New-SPEnterpriseSearchQueryScope -Name "Specific area" -Description "Project sites" -SearchApplication $searchapp -DisplayInAdminUI $true $rule = New-SPEnterpriseSearchQueryScopeRule -RuleType "Url" -Url "http://portal" -MatchingString "http://portal/SpecificArea" -FilterBehavior "Require" -UrlScopeRuleType "Folder" -scope $createdScope $Site = Get-SPSite -Identity http://portal $searchContext = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($Site) $scopes = new-Object Microsoft.Office.Server.Search.Administration.Scopes($searchContext) $displayGroup = $scopes.GetDisplayGroup("http://portal", "Search Dropdown") $displayGroup.Add($scopes.GetSharedScope("Specific area")) $displayGroup.Update()

This script was created based on the following posts so thanks the authors for pointing me in the right direction:
http://social.technet.microsoft.com/Forums/en-US/sharepointadminprevious/thread/6159b4b5-ec8a-4184-b5e8-1a226eff1cee/
http://onlinecoder.blogspot.co.uk/2012/12/powershell-script-to-create-search.html



Configure Search Crawling with PowerShell

A note to myself really so that I can find it easily.

As part of an installation script I wanted to configure an incremental crawl schedule then start a full crawl. The following script met these needs:

$searchapp = Get-SPEnterpriseSearchServiceApplication "Search Service Application"

$contentsource = Get-SPEnterpriseSearchCrawlContentSource "Local SharePoint Sites" -SearchApplication $searchapp

$contentsource | Set-SPEnterpriseSearchCrawlContentSource -ScheduleType Incremental -DailyCrawlSchedule -CrawlScheduleRunEveryInterval 1 -CrawlScheduleRepeatInterval 170 -CrawlScheduleRepeatDuration 180 -Confirm:$false

$contentsource.StartFullCrawl()

This script was created based on the following posts so thanks the authors for pointing me in the right direction:
http://blogs.technet.com/b/heyscriptingguy/archive/2010/09/28/how-to-use-sharepoint-2010-windows-powershell-cmdlets-to-manage-search-crawls.aspx
http://habaneroconsulting.com/en/insights/Setting-crawl-schedules-with-PowerShell.aspx#.Ubm3sfmG3LM



Saturday, 6 April 2013

Disable loopback check with PowerShell



Whilst installing SharePoint 2013 the other day I found a very useful bit of PowerShell which will disable the loopback check.

$regKeyPath = "HKLM:\System\CurrentControlSet\Control\Lsa"
$key = "DisableLoopbackCheck"
New-ItemProperty -Path $regKeyPath -Name $key -Value "1" -PropertyType dword

It should be remembered that disabling the loopback check should only be done in certain scenarios. It is certainly not recommended on Production machines.

Thursday, 14 February 2013

Edit Control Block (ECB)


Now I may well be setting my self up for a big slap with this one but I thought I would go for it anyway. When you are looking at a list item and you activate the drop down box from the item (you know the one with view item, edit item, alert me, delete etc.)  there is a name for it.

I have heard it described as :

  • Item drop down
  • Item Context menu
  • Right click menu (good luck with that).
  • And more


It is however called the "Edit Control Block (ECB)"

Good times. Now line up and give me my punishment for not knowing this. I am picturing a scene like out of Airplane where that woman is getting hysterical and an orderly queue is formed.