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

May 2022
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
« Sep    

Jerry Yasir

  • RT @veronicageek: 📢 PnP #PowerShell 1.9.0 is out! Loads of enhancements & new cmdlets - Check out the CHANGELOG! 👇🏻 https://t.co/PFaQCl9Z… 5 months ago
  • RT @VastGG: We've teamed up with @PixioGaming and @autonomousdotai for this $1,000 Gaming Setup giveaway! To enter, perform these actions… 5 months ago
  • RT @waldekm: Congratulations to all our MVPs 👏👏👏 #MVPBuzz 10 months ago
  • @mattswider @techradar Got It. Thanks Matt. 1 year ago
  • RT @mattswider: I've helped 13,000+ people buy PS5 / Xbox restock, crossed 400,000 followers & it's my birthday🎈🥳 So @techradar's giving a… 1 year 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.
  • Follow Following
    • Jerry Yasir's Blog
    • Join 48 other followers
    • Already have a WordPress.com account? Log in now.
    • Jerry Yasir's Blog
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar