I'm creating a Powershell script about IIS. My purpose is to get a NumericUpDown form to select a port, then it's creating an app pool and a website with the port selected previously. It's working but it returns "OK" instead the value of the port, and I don't know to get the value selected. So the website creation fail. My problem is that I'm new in the Powershell world... but I like it. So I would be glad to get some help please.

I don't know if I should start another topic, but it's the same script.
OK, so I added a process to check if the port is already used.
I give the choice to stop the other website and continue the creation of the website OR the possibility to choose an other port.
It's OK for the first part, but for the second, I don't know how to go back to the function to select an other port.

If someone could help me... The part of the script where it's supposed to go back to the function is called # Go to function call-form_tcp.