powershell SOAP示例 - AIM双重帐户
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了powershell SOAP示例 - AIM双重帐户相关的知识,希望对你有一定的参考价值。
$proxy = New-WebServiceProxy -Uri https://windev.cyberark.local/aimwebservice/v1.1/aim.asmx?WSDL
$cert= New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\cert\GoodCert.cer")
$t = $proxy.getType().namespace
$proxy.ClientCertificates.Add($cert)
$request = New-Object ($t + ".passwordRequest")
$request.AppID = "DistributedApp";
$request.Query = "VirtualUsername=aimtest";
$response = $proxy.GetPassword($request)
write-host "Username:"
$response.username
write-host "Address:"
$response.address
write-host "Content:"
$response.content
$response.VirtualUsername
以上是关于powershell SOAP示例 - AIM双重帐户的主要内容,如果未能解决你的问题,请参考以下文章
powershell AIM CCP PowerShell示例
sh AIM CCP CURL REST示例
sh AIM CCP REST - Bash示例
sh AIM CCP REST - Korn Shell示例
Powershell SOAP 更新正文部分并重新请求
Powershell用双引号和新行替换