C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Create A Taxonomy Group In SharePoint 2013 Using PowerShell
WhatsApp
Gowtham Rajamanickam
8y
8.1
k
0
0
25
Blog
Steps
Open your SharePoint Management Shell.
Copy the code given below and paste it there.
Run the code given below to delete the SharePoint search component.
Code
$taxonomySession=Get-SPTaxonomySession -Site
"https://gowtham.sharepoint.com/tutorials"
$termStore=$taxonomySession.TermStores[
"MMS"
]
$group=$termStore.CreateGroup(
"MMSGroup"
)
$termStore.CommitAll()
Another Reusable code
function DeleteTermGroup
{
param([
string
]$site,[
string
]$termstoreName,[
string
]$groupName)
$session =
new
-
object
Microsoft.SharePoint.Taxonomy.TaxonomySession($site)
$termstore = $session.TermStores[$termstoreName]
$group=$termStore.CreateGroup($groupName)
$termstore.CommitAll()
Write-Output
"Create $groupName"
Delete Term Group
function DeleteTermGroup
{param([
string
]$centralAdmin,[
string
]$termstoreName,[
string
]$groupName)
$site = Get-SPSite $centralAdmin
$session =
new
-
object
Microsoft.SharePoint.Taxonomy.TaxonomySession($site)
$termstore = $session.TermStores[$termstoreName]
$group=$termStore.Groups[$groupName]
$group.TermSets|
foreach
{
$_.Delete()
$termstore.CommitAll()
}
$group.Delete()
$termstore.CommitAll()
Write-Output
"Deleted $groupName"
}
Thanks for reading my blog.
People also reading
Membership not found