Sync SharePoint Managed metadata field with database table using Powershell

No comments

Or: How to add terms to a termset from Powershell :)

In this case we are collecting project numbers from a SQL Server table, the Job table in a Navision instance to be exact.

When we have got the records all fine and happy we connect to SharePoint and asks it gently if it could please let us in to the Managed Metadata Service.
Once inside we rush to the term group Projects, demands it to show us it's term set Project numbers and then convinces it to accept all new numbers or else:

The term set Project number and Term group Projects already have lived a while in the Term Store. If your Term Store are missing out and wants a visit you could introduce them the usual way: Intro to Term store GUI

After getting on equal terms with Projects we settle down, release the site back to SharePoint with a polite Dispose() and retreat happily into the sun again.

As we both feel this was important we arrange a regular appointment using Scheduled Tasks  and promise to call.

Hope it helps,

No comments :

Post a Comment