Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Test UDP Port

3,314 views
Skip to first unread message

Chad

unread,
May 8, 2009, 8:17:01 AM5/8/09
to
Anyone know how to test a UDP port in Powershell. Tried this
http://ping.fm/OkeEw but cannot get failures.

Lance

unread,
May 8, 2009, 9:30:06 AM5/8/09
to
On May 8, 8:17 am, Chad <C...@discussions.microsoft.com> wrote:
> Anyone know how to test a UDP port in Powershell. Tried thishttp://ping.fm/OkeEwbut cannot get failures.

Hey Chad - what do you mean "test"? Are you trying to test that it
can be received by the remote port? That you're able to send FROM the
local port? That the message is definitely received?

Lance Robinson
http://www.lancerobinson.net

Chad

unread,
May 8, 2009, 10:44:06 AM5/8/09
to
I have firewall rules I'm checking to ensure they are put in place. Normally
I will just do a telnet ipadress port number. If there are error you see them
and if nothing is return I know the port is open. I used the Powershell
script in the link below, however even on servers where I know the port is
not listening it does not return any errors.

Marco Shaw

unread,
May 8, 2009, 1:23:58 PM5/8/09
to
On May 8, 11:44 am, Chad <C...@discussions.microsoft.com> wrote:
> I have firewall rules I'm checking to ensure they are put in place. Normally
> I will just do a telnet ipadress port number. If there are error you see them
> and if nothing is return I know the port is open. I used the Powershell
> script in the link below, however even on servers where I know the port is
> not listening it does not return any errors.

Now, I think you have to remember the connectionless nature of UDP, if
that's indeed what you're trying to test.

If your packet is sent from the localhost, it is a success, regardless
of whether the remote end accepts or refuses the UDP packet.

Marco

Chad

unread,
May 8, 2009, 1:54:11 PM5/8/09
to
I think you're right, TCP does fail, but UDP does not. Any other suggestions
on how to write a script to test this?

Marco Shaw [MVP]

unread,
May 10, 2009, 10:28:09 AM5/10/09
to
Chad wrote:
> I think you're right, TCP does fail, but UDP does not. Any other suggestions
> on how to write a script to test this?

Some kind of network sniffer on the other end or logging on the other
end perhaps?

Without some kind of UDP server on the other end, checking this can be a
bit difficult from the client end.

You need the server to return "something" to the client to say that the
UDP packet succeeded, and UDP-type communications doesn't usually
provide this.

Marco


--
*Microsoft MVP - Windows PowerShell
https://mvp.support.microsoft.com/profile/Marco.Shaw
*Co-Author - Sams Windows PowerShell Unleashed 2nd Edition
*PowerShell Co-Community Director - http://www.powershellcommunity.org
*Blog - http://marcoshaw.blogspot.com

Kerry

unread,
May 21, 2009, 7:58:29 PM5/21/09
to
Am not a scripting geek, but we use PortQry to query TCP and UDP Ports...if
its something that you want to as a part of your health check, you can build
a script using portqry

"Chad" <Ch...@discussions.microsoft.com> wrote in message
news:FA6E11AA-3FA4-41C2...@microsoft.com...

0 new messages