【问题标题】:Powershell and BizTalkPowershell 和 BizTalk
【发布时间】:2012-02-25 05:57:14
【问题描述】:

我已经尝试了休在此处发布的脚本:PowerShell BizTalk scripts WITHOUT using BizTalk provider for PowerShell

它几乎完美运行...除了Create-BTS-SendHandler-part...

我不断收到一个奇怪的错误:

Exception calling "Invoke" with "2" argument(s): "Failed during call to one of administration components."
At line:22 char:23
+     $methodInfo.Invoke <<<< ($objSendHandler, $putOptions)
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodTargetInvocation

$error[0]|Format-List -Force gives this:
System.Management.Automation.MethodInvocationException: Exception calling "Invoke" with "2" argument(s): "Failed during call to one of administration components." ---> System.Runtime.InteropServices.COMExcep                            tion (0xC0C02306): Failed during call to one of administration components.
                           at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
                           at System.Management.ManagementObject.Put(PutOptions options)
                           --- End of inner exception stack trace ---
                           at System.Management.Automation.DotNetAdapter.AuxiliaryMethodInvoke(Object target, Object[] arguments, MethodInformation methodInformation, Object[] originalArguments)
                           at System.Management.Automation.DotNetAdapter.MethodInvokeDotNet(String methodName, Object target, MethodInformation[] methodInformation, Object[] arguments)
                           at System.Management.Automation.DotNetAdapter.MethodInvoke(PSMethod method, Object[] arguments)
                           at System.Management.Automation.Adapter.BaseMethodInvoke(PSMethod method, Object[] arguments)
                           at System.Management.Automation.PSMethod.Invoke(Object[] arguments)
                           at System.Management.Automation.ParserOps.CallMethod(Token token, Object target, String methodName, Object[] paramArray, Boolean callStatic, Object valueToSet)
                           at System.Management.Automation.MethodCallNode.InvokeMethod(Object target, Object[] arguments, Object value)
                           at System.Management.Automation.MethodCallNode.Execute(Array input, Pipe outputPipe, ExecutionContext context)
                           at System.Management.Automation.ParseTreeNode.Execute(Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)
                           at System.Management.Automation.StatementListNode.ExecuteStatement(ParseTreeNode statement, Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)
TargetObject          : 
CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId : DotNetMethodTargetInvocation
ErrorDetails          : 
InvocationInfo        : System.Management.Automation.InvocationInfo
PipelineIterationInfo : {}
PSMessageDetails      : 

我尝试同时使用 x86 和普通 ISE 以确保它与 32 位无关。我还检查了我是否有权创建发送处理程序。

谁有想法?

/乔金姆

【问题讨论】:

  • 我已经检查了我的安装脚本,这对我来说很好。你有什么版本的.Net?您还在使用 PowerShell 2.0 吗?另外,您要为什么适配器创建处理程序?它是否适用于不同的适配器?
  • 我们正在运行 .NET 3.5 和 PowerShell 2.0。我正在尝试为文件适配器创建发送处理程序...
  • 这是否适用于另一个适配器?
  • 终于让它工作了。我使用了另一个适配器 (FTP) 和一个全新的主机名。这一点,再加上我在没有同时打开 BizTalk 管理控制台的情况下完成了这一切的事实......但我仍然有一些我无法理解的错误,明天我将不得不对它们进行更多调查。哦,我确实在三种不同的环境中尝试了该脚本,结果相同!
  • 多么奇怪。我没有将此脚本与 FTP 适配器一起使用,但对我来说它适用于 FILE 适配器。不过干得好!

标签: powershell biztalk


【解决方案1】:

您需要为 BizTalk 适配器使用正确的名称,如

平台设置 -> 适配器

BizTalk 管理员中的列表。这些是区分大小写的。

【讨论】:

    猜你喜欢
    • 2011-07-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-08
    • 2016-03-30
    • 2011-11-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多