1

enter image description hereCan any one tell me how to update the url for a group of terms from excel through powershell script in sharepoint 2013.

Please find the screen shot for the same

2 Answers 2

1

Here is a script which can do the same

$site = Get-SPSite -Identity $siteName
$session = Get-SPTaxonomySession -Site $siteName
$termStore = $session.TermStores[$termStoreName]
$Group = $termStore.Groups["Group Name"]

$Group.SetLocalCustomProperty("_Sys_Nav_SimpleLinkUrl", "URL")
$termStore.CommitAll()
3
  • Ok That is for the group what about the Terms and Child ones.I need to do in a bunch with powershell script Dec 2, 2014 at 15:53
  • You can loop through the group and do the same Dec 2, 2014 at 15:55
  • I Got it working thanks see my answer below. One last question. is it possible to set the url from CSV file becase i have more than 200 terms and setting like this takes lot of time. Any idea is highly appreciated Dec 4, 2014 at 5:57
0

I Got it working thanks see my answer below. One last question. is it possible to set the url from CSV file becase i have more than 200 terms and setting like this takes lot of time. Any idea is highly appreciated –

$siteCollectionUrl = "http://sp2013:90"
$site =new-object Microsoft.SharePoint.SPSite($siteCollectionUrl)
$session = New-Object Microsoft.SharePoint.Taxonomy.TaxonomySession($site)
$termStore = $session.TermStores[0]
$group = $termStore.Groups["Corporate Taxonomy"]
$termSet = $group.TermSets["Geography"]
$terms = $termSet.GetAllTerms()
foreach ($term in $terms)
{
    if ($term.Name -eq "Durban")
    {
        Write-Host "Drban Found!"
        $term.SetLocalCustomProperty("_Sys_Nav_SimpleLinkUrl", "Www.Google.com")

    }

$termStore.CommitAll()

}
3
  • You should not ask new questions in answers Dec 4, 2014 at 6:14
  • Robert it is in the same question. Please see my initital question where i have asked to read the data from excel Dec 4, 2014 at 6:20
  • I do see that, but your answer is not really following the standard format of the site. Maybe you should move the info from this answer to the body of your post instead, and delete this answer? Dec 4, 2014 at 7:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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