Portscan

This is a portscan module I've found useful. For example, if I'm host A and can't reach host C, but have code execution on b1,b2,b3...bn, I can run this portscan module using remote powershell on b1...bn to see if any can reach host C.

I'm new to powershell, so suggestions are welcome. I have one C# type that is probably not strictly necessary (I use it for async callbacks), but debugging I couldn't get it working with strictly powershell.