What is my IP with a twist

I needed a tool, preferably a Powershell script, which could show my WAN IP address using alternate outgoing TCP ports, other then default http/s (80 & 443) when using websites like whatismyip.com.

The reason for this is that I use multiple WAN/VPN connections based on protocol for different purposes like web surfing uses one WAN/VPN connection and all other protocols uses the default WAN gateway.
I use pFsense Firewall and create firewall rules with an advanced settings and choose a Gateway other than the default like the example below:

pfsense

For the tool, script or function I needed a site or service which responds to all different protocols. The one i found that were free, simple and used most ports in the TCP range, 1-65535, was portquiz.net.
The decision wasn’t hard, create a Powershell function that leverage the cmdlet Invoke-WebRequest to parse the content of the site and match against keywords using regular expressions.

This is the result:

DISCLAIMER: This script is published on “As Is” basis. I will not take any responsibility for any damage this script might do to your production or test server environment. Please ensure that you test this properly in a non-production environment before running or scheduling the script in a production environment.