Skip to content

Jerry Yasir's Blog

A Place to share and learn.

SharePoint 2013;PowerShell;Managed Metadata

November 27, 2014 Jerry Yasir

using PowerShell to managed Managed Metadata Term Store (SharePoint 2013)


Few weeks back we faced a strange issue in our envionrment where we faced serious performance issues while loading Managed Metadata Home page in SharePoint 2013 Sites.  MMS Home page was loading either very slowly or some time simply does not return. It always end point showing multile authenticaton dialogs.  To prove the point that there was nothing wrong in the platform I wrote some PowerShell script to manage MMS.  The issue ended up being “Firewall”, “Reverbed” and “IPS”.  Network team was able to solve it for us as there was nothing wrong from our side.  But I found the script so positing it here.

Add-PsSnapin Microsoft.SharePoint.PowerShell
$taxonomySite = get-SPSite http://portal.contoso.com/ 
#Connect to Term Store in the Managed Metadata Service Application
$taxonomySession = Get-SPTaxonomySession -site $taxonomySite
$termStore = $taxonomySession.TermStores[0]

$termStore.TermStoreAdministrators
#Delete an Existing Term Store Admin
$termStore.DeleteTermStoreAdministrator("i:0#.w|contoso\spadmin")
$termStore.CommitAll()

#Add a New Term Store Admin
$termStore.AddTermStoreAdministrator("i:0#.w|contoso\sptermstoreAdmin.mr")
$termStore.CommitAll()

#List all Term Store Administrators
$termStore.TermStoreAdministrators
write-host "Connection made with term store -"$termStore.Name

#Creating a new Term Store Group 
$termStoreGroup = $termStore.CreateGroup("Test for Mark 1")
$termStoreGroup = $termStore.Groups["Test for Mark 1"]
$termStoreGroup.Description = "Group description"   
$termStoreGroup.AddGroupManager("contoso\termstoregropumanager")
$termStoreGroup.AddContributor("contoso\termstoregroupcontributer")
$termStore.CommitAll()

#To Delete a Term Group
$termStoreGroup = $termStore.Groups["Test for Mark 1"]
$termStoreGroup.Delete()
$termStore.CommitAll()

#Creating a Term Set
$termSet = $termStoreGroup.CreateTermSet("Term Set Name")
#Create term, term description, and a synonym
$term = $termSet.CreateTerm("Test Term", 1033)
$term.SetDescription("This is a test", 1033)
$term.CreateLabel("This is a test synonym", 1033, $false)
#Update the Term Store
$termStore.CommitAll()

Calendar

February 2021
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
« Sep    

Jerry Yasir

  • @bernierh @Chandani_SPD @m365dev @m365pnp Great work. I have a use case to work on this @Chandani_SPD. Does the wp supports the large lists? 1 day ago
  • RT @bernierh: Check out this new #SPFx web part sample from @Chandani_SPD which demonstrates how to build a full-featured datatable web par… 1 day ago
  • @rezadorrani Great demo. Yesterday someone asked me about parent child multi select check box list. 5 days ago
  • RT @SharePoint: 🤩 Great #Microsoft365dev community demo by @jerryyasir on connecting to external APIs from #SharePoint Framework solution –… 1 week ago
  • RT @vesajuvonen: 💡 What's the developer story in #MSFTViva? Extend it by building: ✅ #SharePoint Framework solutions ✅ #MicrosoftTeams ap… 2 weeks ago
Follow @jerryyasir

Tags

Arabic Azure Bulk Migration;Bulk Upload CAML Query CAMLQuery Client Object Model CSOM Dammam Duplicate Items Export License; Federated Search Results;SharePoint 2013 IE9/HTML5 InfoPath InfoPath 2010 Microsoft Mondays Monthly Meeting MVC MVP MVP Summit Office365 Office365;70-346 Office365;PowerShell OneDrive;FocusedInbox Online Events PowerShell PowerShell;SharePoint Private Cloud RCS REST Riyadh SharePoint User Group RSUG SharePoint SharePoint 2010 SharePoint 2010 Content SharePoint 2013 SharePoint 2013 Search SharePoint 2013 Search;Crawl Download Limit SharePoint 2013 Social SharePoint 2013 User Profile SharePoint 2013 User Profile;PowerShell SharePoint 2013;PowerShell SharePoint 2013;PowerShell;App;App Prefix SharePoint 2013;PowerShell;Managed Metadata SharePoint 2013;PowerShell;Search SharePoint 2013;SharePoint 2013 Installation SharePoint 2016 SharePoint 2016;SP2016 Step by Step SharePoint 2016;SP2016 Step by Step;MIM SharePoint 2016;SP2016 Step by Step;Project SharePoint;Azure SharePoint;FeatureAdmin;FeatureAdminOptimized SharePoint;PACKAGE.BYPASS.DETECTION.CHECK SharePoint;ULSViewer SharePoint Online SharePoint Online;Mail-Enabled Groups SharePoint Online;PowerShell SharePoint Server MVP SharePoint Training Video Series SharePoint Video Series Silverlight Silverlight Toolkit Speaking SPO Site Collection Admin;SharePoint Online SQL Server 2016 RC0 STUG TakTalk Teams Teams;GraphAPI Travelling ucertify User Group Events WebCamps WebMatrix Windows Azure Workflow Manager

Recent Posts

  • PK MVPs #MsTechTalk – Pre-Ignite
  • Creating Teams from Excel using PnPPowerShell and Graph
  • Managing Azure AD Role Assignments using Groups
  • Managing Azure Active Directory Roles using Cloud Security Groups – Part 4
  • Managing Azure Active Directory Roles using Cloud Security Groups – Part 3

Categories

Follow Jerry Yasir's Blog on WordPress.com

Search

Blog at WordPress.com.