Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am trying to create a term group in the Term Store in sharepoint 2013 using powershell.

Bellow you will find the powershell script that I am using plus the error that I am getting.

$taxonomySession=Get-SPTaxonomySession -Site "http://xs066598:3505"
$termStore=$taxonomySession.TermStores["INT00"]
$group = $termstore.CreateGroup("Site Collection-2525")
$group.Description = "My Term Group"
$termStore.CommitAll()
$group=$termStore.Groups["Site Collection-2525"]
$termSet=$group.CreateTermSet("Word Automation Term Set 2")
$termStore.CommitAll()
$termSet=$group.TermSets["Word Automation Term Set 2"]
$term1=$termSet.CreateTerm("Conversion 1",1033)
$termStore.CommitAll()

Error:

Exception calling "CreateGroup" with "1" argument(s): "The current user has insufficient permissions to perform this operat
ion."
At C:\Projects\PowershelScripts\CreateTermSet.ps1:40 char:1
+ $group = $termstore.CreateGroup("Site Collection-2525")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : UnauthorizedAccessException

Anyone knows what permissions do I have to give to be able to execute the powershell script?

Thank you

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Did you run your power shell as run as administrator ? If still the problem persists, then Run the powershell with the user which has full admin rights.

Also sometimes The error is caused by an incorrect “TermsStore administrator account”.

To resolve the issue:

•Go the Central Administration

•Go to : “Manage service applications” ( _admin/serviceapplications.aspx).

•Select “Managed Metadata Service” to get the Terms Store admin interface.

•In the section : “Term Store Administrators”. Add the user that you use to run sharepoint management shell

•Save the changes.

Hope it solves the issue !

share|improve this answer

In SharePoint 2013 Enterprise, I followed the steps above, but it still didn't work.

Following on from there, I went to the 'Term Store Management Tool' in Central Admin (/_layouts/15/termstoremanager.aspx) and added the user there too. This resolved the permissions issue for me.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.