viernes, 17 de febrero de 2012

Obtener un term de metadata Sharepoint 2010

Obtener una referencia al término “Newsfeed”
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Taxonomy")
$site = Get-SPSite http://portal.sharepoint.com
$session = New-Object Microsoft.SharePoint.Taxonomy.TaxonomySession($site)
$termStore = $session.TermStores["Connection to: Managed Metadata Service"]
$group = $termStore.Groups["MyTerms"]
$termSet = $group.TermSets["Features"]
$terms = $termSet.GetTerms(100)
$term = $terms | ?{$_.Name -eq "Newsfeed"}

No hay comentarios:

Publicar un comentario