@@ -45,25 +45,20 @@ For permissions and the most current information about Windows PowerShell for Sh
45
45
46
46
### --------------------EXAMPLE---------------------
47
47
```
48
- C:\PS>$web = Get-SPWeb "UrlOfTheSite"
49
- $tenantOwner = Get-SPEnterpriseSearchOwner -Level SPSite -SPWeb $web
50
- $searchapp = Get-SPEnterpriseSearchServiceApplication
51
- $resultType = Get-SPEnterpriseSearchResultItemType -Owner $tenantOwner -SearchApplication $searchapp
52
- $resultType.BuiltIn
53
-
54
- $rule = Get-SPEnterpriseSearchPropertyRule -PropertyName "ContentTypeId" -Operator "StartsWith"
55
- $rule.AddValue( "0x010063C2F478ACC511DFB869B5BFDFD720851252" )
56
-
57
- $ruleCollection = Get-SPEnterpriseSearchPropertyRuleCollection
58
- $ruleCollection.Add( $rule )
59
-
60
- $displayProperties = "WorkId,Rank,Title,Size,Path,Description,SiteName,HitHighlightedSummary,HitHighlightedProperties,ViewsLifeTime"
61
-
62
- $displaytemplateUrl = "~sitecollection/_catalogs/masterpage/Display Templates/Search/Item_MyCustomDisplayTemplate.js"
63
-
64
- Set-SPEnterpriseSearchResultItemType
48
+ PS C:\>$web = Get-SPWeb http://webUrl
49
+ PS C:\>$tenantOwner = Get-SPEnterpriseSearchOwner -Level SPSite -SPWeb $web
50
+ PS C:\>$ssa = Get-SPEnterpriseSearchServiceApplication
51
+ PS C:\>$resultType = Get-SPEnterpriseSearchResultItemType -Owner $tenantOwner -SearchApplication $ssa
52
+ PS C:\>$resultType.BuiltIn
53
+ PS C:\>$rule = Get-SPEnterpriseSearchPropertyRule -PropertyName "ContentTypeId" -Operator "StartsWith"
54
+ PS C:\>$rule.AddValue('0x010063C2F478ACC511DFB869B5BFDFD720851252')
55
+ PS C:\>$ruleCollection = Get-SPEnterpriseSearchPropertyRuleCollection
56
+ PS C:\>$ruleCollection.Add($rule)
57
+ PS C:\>$displayProperties = "WorkId,Rank,Title,Size,Path,Description,SiteName,HitHighlightedSummary,HitHighlightedProperties,ViewsLifeTime"
58
+ PS C:\>$displaytemplateUrl = "~sitecollection/_catalogs/masterpage/Display Templates/Search/Item_MyCustomDisplayTemplate.js"
59
+ PS C:\>Set-SPEnterpriseSearchResultItemType
65
60
-Identity $resultType `
66
- -SearchApplication $searchapp `
61
+ -SearchApplication $ssa `
67
62
-Name "CustomResultType" `
68
63
-Rules $ruleCollection `
69
64
-RulePriority 1
0 commit comments