Get a Specific Metadata Category
Scenario/Problem: You need to obtain a metadata category reference for use in other search cmdlets.
Solution: Use the Get-SPEnterpriseSearchMetadataCategory cmdlet to assign a variable the results using the -Identity and -SearchApplication parameters.
Providing the identity of the metadata category with the Get-SPEnterpriseSearchMetadataCategory cmdlet retrieves a specific metadata category for the specified search service application. Use this to assign the results to an object for use in other cmdlets, as shown in Listing 13.10.
Listing 13.10. Assigning a Variable to a Specific Metadata Category
$ssApp = Get-SPEnterpriseSearchServiceApplication-Identity 81aedaf7-704c-47f4-8173-5e99a7495ac3$category = Get-SPEnterpriseSearchMetadataCategory ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access