How to open a TCP listener port with PowerShell

PowerShell
If you want to test a firewall rule while the application isn't ready yet, you can open that port on the Windows server using PowerShell. This way you can test the firewall functionality. This can be done with the following commands:
$Listener = [System.Net.Sockets.TcpListener]4444; $Listener.Start();
Where "4444" is the TCP port that you want to open. Once done, you need to stop the listener again. You can use the following command for this:
$Listener.Stop();
Enjoy!