J'ai beaucoup de mal à insérer des informations d'authentification lorsque vous utilisez l'un des services Web Remedy.PowerShell + BMC Remedy + Services Web
$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;
Le code meurt sur la dernière ligne affichée. Tel est le message d'erreur généré:
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
"Impossible de convertir le "ITSM.AuthenticationInfo" valeur de type "ITSM.AuthenticationInfo" taper "ITSM.AuthenticationInfo"." ...Euh, quoi? Comment peut-on résoudre ce problème?
Si quelqu'un a des idées, je suis tout ouïe.
La fonction 'New-WebServiceProxy' peut être trouvée here.
Toute mise à jour si cela a été résolu ou existe-t-il une solution de contournement disponible? Le site lié redirige vers la page introuvable. –