You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The -SearchService Parameter SPEnterpriseSearchSiteHitRule Command expects an "Microsoft.Office.Server.Search.Cmdlet.SearchServicePipeBind" Object and not a "Microsoft.Office.Server.Search.Cmdlet.SearchServiceApplicationPipeBind"
Currently the Service Service Application is passed and the cmdlet throws an exception.
Verbose logs
New-SPEnterpriseSearchSiteHitRule : Cannot bind parameter 'SearchService'. Cannot convert the "SearchServiceApplication
Name=SearchService_Default" value of type "Microsoft.Office.Server.Search.Administration.SearchServiceApplication" to type
"Microsoft.Office.Server.Search.Cmdlet.SearchServicePipeBind".
On Line 160 the Search Service Application is stored into the Variable $serviceApp and then passed to the Parameter -SearchService
There are three approaches to this:
Pass the Name Property of the Search Service Application, which gets converted to the right Search Service.
$serviceApp=Get-SPEnterpriseSearchServiceApplication-Identity $params.ServiceAppName|Select-Object-ExpandProperty Name
Just pass the Service Application Name from the ressource via $params.ServiceAppName
Remove the ServiceAppName Parameter from the Ressource and replace the Get-SPEnterpriseSearchServiceApplication with Get-SPEnterpriseSearchService.
As far as i know you are not able to create additional "Service Services" - so i don't think this needs to be configurable.
The Resource was added with v3.8.0 and had this issue ever since, but removing the Parameter would result in a breaking Change.
SharePoint version and build
SharePoint Server 2016 and SE
Operating system the target node is running
OsName : Microsoft Windows Server 2016 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture : 64-bit
WindowsBuildLabEx : 14393.7604.amd64fre.rs1_release.241127-1746
OsLanguage : en-US
OsMuiLanguages : {en-US}
PowerShell version and build the target node is running
Problem description
The
-SearchService
Parameter SPEnterpriseSearchSiteHitRule Command expects an "Microsoft.Office.Server.Search.Cmdlet.SearchServicePipeBind" Object and not a "Microsoft.Office.Server.Search.Cmdlet.SearchServiceApplicationPipeBind"Currently the Service Service Application is passed and the cmdlet throws an exception.
Verbose logs
DSC configuration
Suggested solution
SharePointDsc/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/MSFT_SPSearchCrawlerImpactRule.psm1
Lines 160 to 174 in e039c98
On Line 160 the Search Service Application is stored into the Variable
$serviceApp
and then passed to the Parameter-SearchService
There are three approaches to this:
$params.ServiceAppName
ServiceAppName
Parameter from the Ressource and replace theGet-SPEnterpriseSearchServiceApplication
withGet-SPEnterpriseSearchService
.As far as i know you are not able to create additional "Service Services" - so i don't think this needs to be configurable.
The Resource was added with v3.8.0 and had this issue ever since, but removing the Parameter would result in a breaking Change.
SharePoint version and build
Operating system the target node is running
PowerShell version and build the target node is running
SharePointDsc version
The text was updated successfully, but these errors were encountered: