New-WebServiceProxy generates the following error in the endpoint logs:
[Error] [Api-4] The term 'New-WebServiceProxy' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Here is the code that produces the error:
New-PSUEndpoint -Url "/adcomputer" -Method @('GET','POST') -Endpoint {
New-WebServiceProxy -Uri 'https://vault/AimWebService/v1.1/AIM.asmx' -UseDefaultCredential
}
I see that the Micosoft.PowerShell.Management module is listed in Platform\Modules, so not really sure what the error is. I am not hosting PSU in IIS (I am using Kestrel, and PSU is running as a Windows service) as I saw a post indicating the New-WebServiceProxy doesn’t work when hosting in IIS.
Product: PowerShell Universal
Version: 4.2.21