7

I'm trying to consume a SOAP web service at PowerShell 6. I used to do this task with the New-WebServiceProxy command on early versions but no longer exists on PowerShell 6. Is there any similar command?

2 Answers2

2

I'm using currently PowerShell 7 and the lack of New-WebServiceProxy affect me in several Scripts that was running with this CmdLet as expected in PS 5.1.

As 'danno' answered before, Invoke-WebRequest is the natural option in Core editions.

Googling I found two sites with examples to implement a workaround for SOAP Web Services:

https://www.itprotoday.com/powershell/getting-started-soap-based-web-services-and-powershell

... and ...

https://www.powershellbros.com/send-soap-message-powershell/

Maybe someone says it that this is go back, but really works!

0

A combination of ConvertTo-XML with Invoke-WebRequest should be able to get you where you need to be, both of which are supported in PowerShell 6.

danno
  • 277
  • 3
  • 7