Skip to content
  • Facebook
  • Twitter
  • Google Plus
  • Pinterest
  • YouTube
SYNK Ventures

SYNK Ventures

  • Home
  • About
  • Blog
  • Contact
  • Downloads / Templates

Tag: Taxonomy

December 15, 2020 KS PowerShell, SharePoint, SharePoint 2013, SharePoint 2019, SharePoint Online

Add Child Terms under Terms using PnP PowerShell #PnPPowerShell in SharePoint Taxonomy / Metadata

If you like my video or the blog please subscribe to my YouTube channel to get me going https://www.youtube.com/channel/UC6vLzWN-3aFG8dgTgEOlx5g

In this blog I will talk about a simple PnP PowerShell script which adds Child Terms under each term following the same hierarchy in SharePoint Taxonomy / Metadata.

Note that the same script can be used in SharePoint Online, 2013, 2016 or 2019.

You can refer to below hierarchical structure:

Term Group (Region names) –> Term Set (Region) –> Countries –> Customer –>Mine

Metadata hierarchical structure

In this example I want to add a new term called “Mine missing” under each customer, so instead of doing it manually I will use a script to add Mine missing under each Customer for each country.

 Connect-PnPOnline -url <<site url >>
#Here I have used term guid for Asia Pacific to point to a Term
 $ParentTerm = Get-PnPTerm -Identity <<term guid>> -TermSet "Regions" -TermGroup "Region names" -IncludeChildTerms -Recursive
    $countryterm = $ParentTerm.Terms
    foreach($term in $countryterm)
    {
        $addterms = $term.Terms
        foreach($addedterm in $addterms)
        {
            $ChildTerm = $addedterm.CreateTerm("Mine Missing", 1033, (New-Guid))
            Invoke-PnPQuery 
        }
        
    }

Connect with me on Twitter or Linked In and follow YouTube Channel or my blog https://twitter.com/SinhaKislay

https://www.linkedin.com/in/kislaysinha

https://synkventures.com

https://www.youtube.com/channel/UC6vL…

Select to find

  • Active Directory (2)
  • Azure (3)
  • Azure Virtual Machine (1)
  • Bookings (1)
  • Data Science (1)
  • Dataverse (1)
  • Domain Migration (1)
  • eDiscovery (1)
  • GigJam (1)
  • Hub Sites (2)
  • Lists (1)
  • LogicApps (1)
  • Machine Learning (2)
  • MegaMenu (1)
  • Microsoft 365 (15)
  • Microsoft Forms (2)
  • Microsoft Graph (10)
  • Microsoft Lists (2)
  • microsoft teams (15)
  • Microsoft ToDo (1)
  • Micrsoft Flow (8)
  • Office 365 (21)
  • Planner (1)
  • Power Automate (5)
  • PowerApps (7)
  • PowerShell (7)
  • Search (1)
  • SharePoint (44)
  • SharePoint 2013 (9)
  • SharePoint 2013 to Office 365 (3)
  • SharePoint 2013 Workflow (1)
  • SharePoint 2019 (5)
  • SharePoint Online (23)
  • SharePoint Search Crawler (1)
  • SharePoint SPFX (6)
  • SharePoint WebHook (1)
  • Spaces (1)
  • Sub sites (1)
  • Teams (8)
  • Uncategorized (1)
  • Visual Studio (2)
  • WebHook (1)
  • Worklow Manager (1)

Follow me

  • LinkedIn
  • Twitter

Follow me on Twitter

My Tweets

Tags

Azure Azure Machine Learning Azure Virtual Machine Backup business apps Charts client side web part Data Science Dataverse Downloads Error in Visual Studio Excel Excel Survey Exchange GigJam Graphs Hub Sites Hybrid Hybrid Architecture List Lists Lookbook Machine Learning MegaMenu Metadata microsoft Microsoft 365 Microsoft Flow Microsoft Flow Template Microsoft Forms Microsoft Graph Microsoft Lists Microsoft Planner microsoft teams Microsoft ToDo Migration Navigation New Domain o365 Office 365 OneDrive PnP PowerShell. PowerApps PowerApps and Flow Power Automate PowerShell Project Nucleus React Recycle Bin Redirect HTTP to HTTPS REST API Restore Scottish Summit Search crawler SharePoint SharePoint 2013 sharepoint 2016 SharePoint 2019 SharePoint Online SharePoint Onpremise SharePoint WebHook Spaces SPFX Starter Kit Sub sites Task List Taxonomy Teams Templates Trello Visual Studio WebHook Workflow Workflow 2013 Workflow manager

Translate with Google

A WordPress.com Website.
  • Follow Following
    • SYNK Ventures
    • Already have a WordPress.com account? Log in now.
    • SYNK Ventures
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...
 

    Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
    To find out more, including how to control cookies, see here: Cookie Policy