Once the relevant Connector has been set up and enabled, any new documents created in SharePoint as well as any modifications to existing documents, will be managed by Records365. But what about any existing content that predated the Connector?
The Content Registration process provides a tailored method of locating documents and folders in SharePoint and passing them to their respective Connector for submission to Records365.
The Content Registration process for SharePoint requires a level of familiarity with Microsoft PowerShell. Most likely, an Administrator or IT professional will be required for some or all of this process. Please feel free to contact our support team at firstname.lastname@example.org to obtain the script and to ensure that you have the required level of technical support to successfully complete the process.
Content Registration Architecture
Content Registration is a scripted process driven by Microsoft PowerShell. RecordPoint provides a template script that you can customize further according to your requirements. The SharePoint script does not use the Records365 API at all. This means all parameters needed to connect to azure and the Records365 service are not needed.
The content registration process inserts the appropriate information, for content being registered, into the SharePoint connector queue, which the connector will then process and submit to Records365.
To register content the script needs to securely authenticate against SharePoint and SQL Server, to do this the following details are required:
- User Credentials that have access to the relevant SharePoint Farm.
- User Credentials that have access to the SQL server instance.
Running the Content Registration script
SharePoint Client Side Libraries
The Content Registration script uses the SharePoint Client Side Object Model (CSOM) to connect to SharePoint. The Microsoft.SharePoint.Client and Microsoft.SharePoint.Client.Runtime libraries must be present in the /bin folder in the directory where the script is run. Please use version 16.1.6420.1200 or later of CSOM.
The Content Registration script requires a number of parameters. These describe:
- The Records365 tenant that you are registering for.
- The location of the SharePoint content that you wish to register with Records365.
- Authentication details for connecting to your SharePoint farm and SQL Server instance.
- Settings that determine how the script runs.
|The URL of the SharePoint site for the content being registered. May be a root site and must end with a “/”.
|The username of the account that has access to the SharePoint site.
|The password for the entered value for SPUsername. This must be passed to the script as a SecureString.
|The top level object such that all content being registered is located under. May be either Site, Web, List, Folder or Item.
|The name of the SQL Server.
|The name of the SQL Server database that contains all of the information for the SharePoint connector.
|The username for the account that has write access to the related SharePoint connector database.
|The password for the user specified by SQLUserName. This must be passed to the script as a SecureString.
|The method by which to connect to SQL Server, accepts either “Windows” for Windows NT account types or “SQL” for SQL Account Logins.
|The ID of your SharePoint Connector in Records365.
These parameters describe where the script will look for content to submit to Records365. The script is recursive – for example, if the Context supplied is List, then the script will submit all documents or list items contained within the List or Document Library provided by ListTitle, including any folders within that List or Library. Both Site and Web Contexts use the WebUrl parameter supplied above and do not require additional parameters for Context.
|The name of a List that the script will target when the Context is List or Item.
|The title of a List Item in a custom List, or the filename (“FileLeafRef”) of a Document in a Document Library when the Context is Item. Also requires ListTitle.
|The path (Web Relative URL) to the Folder when the Context is Folder. Must not be prefixed with “/” – eg: Contracts/Subcontract.
|Either “Interactive” or “NonInteractive”. Interactive prompts for parameters, whereas NonInteractive expects parameters to be supplied. Defaults to Interactive.
|When True, all events are saved to a log file. Defaults to True.
|When True, all events displayed on screen inline, otherwise events are displayed in a progress window above the script. Defaults to False.
# Create SecureString password for service
[SecureString] $svcPasswordSecure = ConvertTo-SecureString -String "<ServicePassword>" -AsPlainText -Force.\SPContentRegistration.ps1 -WebUrl "http://<SharePointSite>/<WebUrl>" -ListTitle "<List Title>" -Context List -SPUserName "<SharePoint Username>" -SPPassword "<SecureString>" -ServerName "<SQL Server Name>" -DatabaseName "<Connector DB Name>" -SQLUserName "<SQL UserName>" -SQLPassword "<SecureString>" -ConnectorId "<OnPrem Connector ID>" -sqlAccountType "<AccountType>"
Note: if you wish to pass in the SharePoint password you will need supply it as a SecureString. If you do not pass in a password for SharePoint you will be prompted for it and the script will handle the secure encoding.
Retrieving the SharePoint Connector ID from Records365
- Login to Records365
- Go to the Connector Gallery by clicking the cog icon in the top right of the screen.
- Click on your SharePoint connector tile.
- Click on the Download Settings link from the slide out panel.
- Note the value for the ConnectorId entity in the downloaded file.