Forum Discussion
zhifeng_ke
Mar 30, 2022Copper Contributor
Regarding whether windows server has a quick start port listening scheme
Linux servers all have a certain version of Python installed by default, and Python can provide a simple service, it is very easy, You can quickly create a port listener for testing network connectiv...
LainRobertson
Mar 31, 2022Silver Contributor
Yeah, you can. It's not a command like what you've used in your example but it's perfectly fine for network connectivity testing.
Here's an example using TCP 41000.
Start listening command:
($listener = [System.Net.Sockets.TcpListener]::new([System.Net.IPAddress]::Any, 41000)).Start()
Running a basic test command from on the host itself against the listener from above:
Test-NetConnection -ComputerName localhost -Port 41000
Finally, stop the listener:
$listener.Stop()
Cheers,
Lain