When I was building my vRops Custom Rest outbound plugin I wanted to capture the output from vRops to an XML file… this way I could review the output easily!

I came up with the following Powershell solution (based off an example from someone else which I can no longer credit cause I can’t find it) it works for both HTTP and HTTPS, for HTTPS to work you will need to run the following netsh command once in Windows as an Administrator

You can customize the appid and the certhash if you wish… I just added the example below to make it easy.

Below is the script, If you want to change the listening ports just change 6666 / 6667, make sure you create a folder called requests in the same location as the script as this is where the XML’s will be output to.

How to use it??

POST to /customrest with ContentType ‘text/xml’

POST to /rest with ContentType ‘application/xml’

One the script is listening if you want to stop it… just do a GET to /stop