Skip to content

Commit ed878bf

Browse files
authored
Merge pull request MicrosoftDocs#616 from tseward/patch-301
Update Set-SPEnterpriseSearchMetadataMapping.md
2 parents 1225fb2 + 726af08 commit ed878bf

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

sharepoint/sharepoint-ps/sharepoint-server/Set-SPEnterpriseSearchMetadataMapping.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ For permissions and the most current information about Windows PowerShell for Sh
3131

3232
### ------------------EXAMPLE------------------
3333
```
34-
C:\PS>$searchapp = Get-SPEnterpriseSearchServiceApplication
35-
## get the crawl property to set to, in this case a new property is created
36-
$cat = Get-SPEnterpriseSearchMetadataCategory -SearchApplication $searchapp -Identity People
37-
$cp = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $searchapp -Category $cat -Limit 1
38-
$ncp = New-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $searchapp -Name "MyNewCrawlProp" -PropSet $cp.PropSet -Category $cp.CategoryName -IsNameEnum $false -VariantType $cp.VariantType -IsMappedToContents $true
39-
## get the mapping to replace
40-
$mycp = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $searchapp -Name MyCrawlProp
41-
$map = Get-SPEnterpriseSearchMetadataMapping -SearchApplication $searchapp -ManagedProperty $mp -CrawledProperty $mycp
34+
PS C:\>$ssa = Get-SPEnterpriseSearchServiceApplication
35+
PS C:\>## get the crawl property to set to, in this case a new property is created
36+
PS C:\>$cat = Get-SPEnterpriseSearchMetadataCategory -SearchApplication $ssa -Identity People
37+
PS C:\>$cp = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $ssa -Category $cat -Limit 1
38+
PS C:\>$ncp = New-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $ssa -Name "MyNewCrawlProp" -PropSet $cp.PropSet -Category $cp.CategoryName -IsNameEnum $false -VariantType $cp.VariantType -IsMappedToContents $true
39+
PS C:\>## get the mapping to replace
40+
PS C:\>$mycp = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $ssa -Name MyCrawlProp
41+
PS C:\>$map = Get-SPEnterpriseSearchMetadataMapping -SearchApplication $ssa -ManagedProperty $mp -CrawledProperty $mycp
4242
## set the new crawl property to map to for this mapping
43-
Set-SPEnterpriseSearchMetadataMapping -Identity $map -SearchApplication $searchapp -CrawledProperty $ncp
43+
PS C:\>Set-SPEnterpriseSearchMetadataMapping -Identity $map -SearchApplication $ssa -CrawledProperty $ncp
4444
```
4545

4646
This example updates an existing mapping between the managed property UserName and the crawled property MyCrawlProp (see `New-SPEnterpriseSearchMetadataMapping`) for the default search service application.

0 commit comments

Comments
 (0)