Zhaobab
5/21/2015 - 3:00 PM

Delete all Managed Metadata Properties from default Search Service application

Delete all Managed Metadata Properties from default Search Service application

# ----------------------------------------------
# Author: Romain Blanchard
# Date: 21.05.2015
# Description: Delete all Managed Metadata Properties from default Search Service application
# ----------------------------------------------

$searchapp = Get-SPEnterpriseSearchServiceApplication
$mp = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $searchapp | Where {$_.Name -like "gdoc*"}
$mp | % { Get-SPEnterpriseSearchMetadataMapping -SearchApplication $searchapp -ManagedProperty $_ | Remove-SPEnterpriseSearchMetadataMapping -Confirm:$false }
$mp | Remove-SPEnterpriseSearchMetadataManagedProperty -Confirm:$false