# build credential object $Pass = ConvertTo-SecureString " xxxx " –AsPlaintext –Force $Cred = New-Object System.Management.Automation.PsCredential "domain\User",$Pass # just a simple web service tester $wsProxy = New-WebServiceProxy -Credential $Cred -URI http://yourserver.com/path?WSDL $result = $wsProxy.WebServiceMethod('Parameter') $result
To use this example you need to replace WebServiceMethod with the web service method you want to use. It is up to you to provide proper parameters. Having a look into service's WSDL file will help here.
General note, execution of unsigend srcripts needs to be activated. Please see
http://www.windowsecurity.com/articles/PowerShell-Security.html for more information.
Keine Kommentare:
Kommentar veröffentlichen