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 $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()