SharePoint – Get all terms/keywords from the taxonomy store

SharePoint PnP

Yesterday I publish an article how to replace/add keywords on documents. But one of the requirements was that you needed the ID of the term you want to find and add/replace. So yet again I created a small function that allows you to return all terms from the store.

You still need the PnP SharePoint cmdlets, which you can download here.

SharePoint – Adding keywords to documents with PowerShell

SharePoint PnP

Ever needed to replace or add keywords to documents in a SharePoint site?
Recently I was in charge of migrating site collections from a on-premise environment to SharePoint online.

After the migration we needed to replace a certain taxonomy keyword on all documents. So I created a small PowerShell function to facilitate the company to do so. The function takes 5 parameters:

  • Url
    • URL to the site collection.
  • Credential
    • Credentials to contact the site collection.
  • TermGuid
    • The guid of the keyword that you want to find.
  • AddTermGuid
    • The guid of the new keyword you want to add/replace.
  • Replace (switch)
    • If this switch is set, it will substitute TermGuid with AddTermGuid

In order for the function to work you need to download the SharePoint PnP cmdlets here.

You are able to get the SharePoint taxonomy keyword GUID through the Get-PnPTerm cmdlet, find more information here.