2012-02-02 3 views
2

Я пробовал скрипты, которые Hugh разместили здесь: PowerShell BizTalk scripts WITHOUT using BizTalk provider for PowerShellPowershell и BizTalk

Это почти работало отлично ... для Create-BTS-SendHandler -части За исключением ...

я получаю странную ошибку:

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-битным. Я также проверил, что у меня есть права на создание Send-Handlers.

Любой, у кого есть идея?

/Йоаким

+0

Я проверил свои установочные сценарии, и это отлично работает для меня. Какая версия .Net у вас есть? Также вы используете PowerShell 2.0? Кроме того, какой адаптер вы пытаетесь создать hander? Работает ли он с другим адаптером? –

+0

Мы работаем с .NET 3.5 и PowerShell 2.0. Я пытаюсь создать Send-Handler для File-адаптера ... – Joakim

+0

Работает ли это с другим адаптером? –

ответ

0

Вы должны использовать правильные имена для BizTalk адаптеров, как указано в

Настройки платформы -> Адаптеры

список в BizTalk администратора. Они чувствительны к регистру.

enter image description here

Смежные вопросы