mercredi 3 décembre 2014

PowerShell Metadata Navigational Menu of Simple Links from excel file in sharepoint 2013



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


Thanks, Sandy


As suggested Below by Amal Hashim



$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", "URL")

}

$termSet.CommitAll()

}







0 commentaires:

Enregistrer un commentaire