Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

how to controll slow response times for negative? when using $tcpobject = new-Object system.Net.Sockets.TcpClient

$
0
0

hi,

I am trying to quickly scan some servers to see what ports are open and have come across this:

$tcpobject = new-Object system.Net.Sockets.TcpClient

It works fine but  the time out for a NEGATIVE answer is very long (~20seconds !), how can I control /wrap this so if  a positive answer is not received in x mSecs then I will consider this a negative.

I see a sendtimeout property but I cannot figure out how to set it

I also intend to try this for UDP

Roy


roys99




Viewing all articles
Browse latest Browse all 21975

Trending Articles