首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PowerShell + BMC Remedy +网络服务

PowerShell + BMC Remedy +网络服务
EN

Stack Overflow用户
提问于 2012-03-31 01:04:31
回答 1查看 4.3K关注 0票数 0

在使用任何Remedy web服务时,我在插入身份验证信息时遇到了相当大的困难。

代码语言:javascript
复制
$URL = "https://itsm.url.com/arsys/WSDL/public/server_name/HPD_IncidentInterface_WS";
$URI = New-Object System.Uri($URL);
$ITSM = New-WebServiceProxy -Uri $URI -Namespace ITSM;
$Credentials = New-Object ITSM.AuthenticationInfo;
$Credentials.userName = "UserName";
$Credentials.password = "PassworD";
$Credentials.authentication = '';
$ITSM.AuthenticationInfoValue = $Credentials;

代码在显示的最后一行终止。以下是生成的错误消息:

代码语言:javascript
复制
Exception setting "AuthenticationInfoValue": "Cannot convert the "ITSM.AuthenticationInfo" value
of type "ITSM.AuthenticationInfo" to type "ITSM.AuthenticationInfo"."
At C:\\ITSM Automation\Automate Incident Modification.ps1:45 char:8
+     $ITSM. <<<< AuthenticationInfoValue = $Credentials;
+ CategoryInfo          : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyAssignmentException

“无法将"ITSM.AuthenticationInfo”类型的"ITSM.AuthenticationInfo“值转换为”ITSM.AuthenticationInfo“类型。”...um...什么?如何对此进行故障排除?

如果有人有想法,我洗耳恭听。

函数'New-WebServiceProxy‘可以在here中找到。

EN

回答 1

Stack Overflow用户

发布于 2013-02-14 08:37:58

在会话中重用相同的Namespace值时,WebServiceProxy上报告了一个错误。如果你遇到这个问题,你可以关闭然后重新打开powershell,或者避免使用-Namespace参数。

请参阅Microsoft Connect上的错误报告。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9947371

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档