>Nice powershell to display Managed, crawled and mapped metadata properties in SharePoint 2010

>

So on your SharePoint server, paste the script below into powershell_ISE or a script file e.g. PropListing.ps1 and edit the $searchAppName variable to be the exact name of your search application.
image

Run the script and the output should explain itself.

image

$PSSnapin = Add-PsSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

$searchAppName = “Your name Enterprise Search Service Application”

$app = Get-SPEnterpriseSearchServiceApplication -identity $searchAppName

$cats = Get-SPEnterpriseSearchMetadataCategory -SearchApplication $app
$ManagedMapped = @{}

Write-Host “Categories”
$cats | % {
$cat = $_
Write-host “`t” $cat.name

$crawledprops = $cat.GetAllCrawledProperties()
Write-host “`t`t” “Crawled properties”
$crawledprops | % {
$crawledProperty = $_
Write-Host “`t`t`t” $crawledProperty.name

$mappedManagedProps = $crawledProperty.GetMappedManagedProperties()

if($mappedManagedProps.Count -gt 0) {
Write-Host “`t`t`t`t” “Mapped to managed property(s)”
$mappedManagedProps | % {
$mappedManagedProperty = $_
Write-Host “`t`t`t`t`t” $mappedManagedProperty.name
if(-not $ManagedMapped.ContainsKey($mappedManagedProperty.name)) {
# record this prop for later
$ManagedMapped.Add($mappedManagedProperty.name,$mappedManagedProperty)
}
}
}
}

}
# Find unmapped managed properties
Write-host “Listing of unMapped Managed properties”
Write-host “————————————–”

$allManProps = $app.GetManagedProperties()
$allManProps | % {
$allprop = $_
if(-not $ManagedMapped.ContainsKey($allprop.name)) {
Write-host “`t” $allProp.name
}
}

 

No warranties implied or otherwise Smile