无法将 "System.Object[]"转换为 "Microsoft.SharePoint.PowerShell.SPSolutionPipeBind "类型。

问题描述 投票:0回答:2

当我尝试将一个.wsp部署到SharePoint 2013门户时,得到这个错误。有人有什么办法吗?

Get-SPSolution : 无法将'System.Object[]'转换为参数'Identity'所要求的'Microsoft.SharePoint.PowerShell.SPSolutionPipeBind'类型。指定的方法不被支持.At C:\360Install\Version 4.1 SP6\Setup\Data\Scripts\SharePoint2010/Common\SIMapping.psm1:229 char:37+ $existingSolution = Get-SPSolution $SolutionId -ErrorAction SilentlyContinue+ ~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Get-SPSolution], ParentContainsErrorRecordException + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.SharePoint.PowerShell.SPCmdletGetSolution

sharepoint-2013 windows-server-2012
2个回答
1
投票

这个错误通常是在向参数提供一个集合时出现的,而这个集合实际上是一个对象。为了更好的理解,我提供了一个下面的例子。

$ssa = Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchMetadataCrawledProperty  -SearchApplication $ssa -Category 'Business Data' | Where {$_.Name -Match "GetProduct"} | ft Name

上面的例子将抛出与你遇到的相同的错误。在上面的例子中,服务器上安装了多个搜索服务应用程序。所以第一行代码返回的是一个集合而不是一个单一的对象。在第二行中,你可以注意到这个集合被分配给了属性 搜索应用,它是期待一个单一的对象。


0
投票

我也有同样的困难!当我试图解决搜索抓取卡在'开始'状态时。

当我试图解决搜索抓取,这是卡在'开始'状态。

进一步挖掘,我发现它是无法检索拓扑组件的健康状态.所以,我试图用这个方法来建立搜索拓扑,使用powerhell(lol)。这是我的 档号.

然而在这一步。"$newTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa",我得到了同样的错误。

New-SPEnterpriseSearchTopology : Cannot convert 'System.Object[]' to the type
'Microsoft.Office.Server.Search.Cmdlet.SearchServiceApplicationPipeBind'
required by parameter 'SearchApplication'. Specified method is not supported.
At line:1 char:66
+ $newTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa
+                                                                  ~~~~
    + CategoryInfo          : InvalidArgument: (:) [New-SPEnterpriseSearchTopo
   logy], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.Office.Server.Se
   arch.Cmdlet.NewSearchTopology
© www.soinside.com 2019 - 2024. All rights reserved.