Skip to content

Instantly share code, notes, and snippets.

@puttyq
Last active September 18, 2020 13:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save puttyq/99447859f23bc81025b3b9839daea12f to your computer and use it in GitHub Desktop.
Save puttyq/99447859f23bc81025b3b9839daea12f to your computer and use it in GitHub Desktop.
Using New-WebServiceProxy to connect into SAP ES via PowerShell
# Proxy variables
$username = "xxxxxxx"
$password = "*******"
$uriUserManagement = "http://servername/sap/bc/srt/wsdl/../../../../zfimconnector_user?sap-client=100"
$uriUserManagementClass = "SAP_WSDL"
$uriUserManagementNamespace = "SAP"
# Create secure credential
$secpasswd = ConvertTo-SecureString $password -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential ($username, $secpasswd)
# Create web services proxy object
$proxyUser = New-WebServiceProxy -Uri $uriUserManagement -Credential $credential -Class $uriUserManagementClass -Namespace $uriUserManagementNamespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment