2012-03-30 3 views
0

Remedy 웹 서비스를 사용할 때 인증 정보를 삽입하는 데 상당한 어려움이 있습니다.PowerShell + BMC Remedy + Web Services

$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; 

마지막 줄에 코드가 표시됩니다. 이 발생하는 오류 메시지입니다 "."

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 "유형의 값"의 "변환 할 수 없습니다" ... 음 ... 뭐라구? 이 문제를 어떻게 해결합니까?

누구나 아이디어가 있다면, 나는 모두 귀입니다.

'New-WebServiceProxy'함수는 here입니다.

답변

1

세션에서 동일한 Namespace 값을 다시 사용할 때 WebServiceProxy에보고 된 버그가 있습니다. 이 경우, powershell을 닫았다가 다시 열거 나 -Namespace 매개 변수를 사용하지 않아도됩니다.

Microsoft Connect의 버그 보고서를 참조하십시오.

+0

이 문제가 해결되었는지 또는 어떤 문제 해결 방법이 있습니까? 연결된 사이트가 페이지를 찾을 수 없음으로 리디렉션됩니다. –

관련 문제