How to Delete Enterprise Keywords in Term store using Powershell in Sharepoint 2010/2013/2016?
Hello SharePointers,
Here is the powershell script to delete enterprise keywords in Termstore .
$taxonomySite = Get-SPSite http://url/
$taxonomySession = Get-SPTaxonomySession -site $taxonomySite
$termStore = $taxonomySession.TermStores[“Managed Metadata Service “]
Write-Host “Connection made with term store -“$termStore.Name
$termStoreGroup = $termStore.Groups[“System”]
$termSet = $termStoreGroup.TermSets[“Keywords”]
foreach($keyWord in $termSet.Terms)
{ $keyWord.Delete()
Write-Host “Deleted keyword:” $keyWord.Name
}
$termStore.CommitAll()
Happy SharePoint folks 🙂