Steps
  1. Open your SharePoint Management Shell.
  2. Copy the code given below and paste it there.
  3. Run the code given below to delete the SharePoint search component.
Code
  1. $taxonomySession=Get-SPTaxonomySession -Site "https://gowtham.sharepoint.com/tutorials"
  2. $termStore=$taxonomySession.TermStores["MMS"]
  3. $group=$termStore.CreateGroup("MMSGroup")
  4. $termStore.CommitAll()
Another Reusable code
  1. function DeleteTermGroup
  2. {
  3. param([string]$site,[string]$termstoreName,[string]$groupName)
  4. $session = new-object Microsoft.SharePoint.Taxonomy.TaxonomySession($site)
  5. $termstore = $session.TermStores[$termstoreName]
  6. $group=$termStore.CreateGroup($groupName)
  7. $termstore.CommitAll()
  8. Write-Output "Create $groupName"
Delete Term Group
  1. function DeleteTermGroup
  2. {param([string]$centralAdmin,[string]$termstoreName,[string]$groupName)
  3. $site = Get-SPSite $centralAdmin
  4. $session = new-object Microsoft.SharePoint.Taxonomy.TaxonomySession($site)
  5. $termstore = $session.TermStores[$termstoreName]
  6. $group=$termStore.Groups[$groupName]
  7. $group.TermSets|foreach{
  8. $_.Delete()
  9. $termstore.CommitAll()
  10. }
  11. $group.Delete()
  12. $termstore.CommitAll()
  13. Write-Output "Deleted $groupName"
  14. }
Thanks for reading my blog.