Send-UDPDatagram.ps1

by Dec 5, 2008

# Send-UDPDatagram # Sends a UDP datagram to a port # Thomas Lee – tfl@psp.co.uk # Made up for this example [int] $port = 20000 $address = [system.net.IPAddress] :: Parse( " 10.10.1.100 " ) # Create IP Endpoint $end = new – object system.net.IPEndPoint $address , $port # Create Socket $saddrf = [system.net.sockets.AddressFamily] :: InterNetwork $stype = [system.net.sockets.SocketType] :: Dgram $ptype… Read the full text.