Send-UDP Cmdlet

Parameters   Output Objects   Configuration Settings  

The Send-UDP cmdlet is used to send UDP datagrams.

Syntax

Send-UDP [parameters]

Remarks

The Send-UDP cmdlet will bind to a specific local host address and send UDP datagrams to a remote Server.

The cmdlet can be used by specifying a Server and Port to send datagrams to, and optionally you can set LocalIP to the IP address of the interface that you want to use, as well as LocalPort for the port. The Data parameter will specify the data that should be sent to the remote host. For each datagram sent, the cmdlet will return a UDPData object. Due to the nature of the UDP protocol, the cmdlet cannot know whether the remote host actually received the data or not. The Receive-UDP cmdlet can be used for the server side equivalent of this client oriented cmdlet.

This cmdlet also exposes the Wake-on-LAN functionality through the WakeOnLAN parameter. Supplying the MAC address of the remote network interface through the WakeOnLAN parameter and the IP address of the interface through the Server parameter, will cause for the cmdlet to send a WakeOnLAN request to the remote NIC. If the NIC supports wake on LAN, then the remote machine will be turned on.

The cmdlets support pipeline input for some of their parameters. Prebuilding an object and piping it to the cmdlet is very useful, but should be used with caution to prevent security conflicts. Steps have been taken to decrease the risk of a possibly accidental pipe to the cmdlet, for instance, the Credential parameter cannot be piped to the cmdlet and must be specified manually.


# send test udp packet to server
send-udp -server $server -port 4444 -data "test from netcmdlets"

# WOL (wake on LAN)
send-udp -server 10.0.1.173 -WakeOnLAN 00-80-C8-E9-A5-A9

Parameter List


The following is the full list of the parameters of the cmdlet with short descriptions. Click on the links for further details.

LogFileThe location of a file to which debug information is written.
ConfigSpecifies one or more configuration settings.
DataA string of data to be sent to the remote host.
LocalIPThe IP address of the local interface to use.
LocalPortThe local port that the cmdlet should use.
LogFileThe location of a file to which debug information is written.
PortThe UDP port in the remote host to which to send data.
RouteIf set to False, forces the socket to send data directly to interface (no routing).
ServerThe address of the Server.
WakeOnLANSpecifies the MAC address of the host.

Output Objects


The following is the full list of the output objects returned by the cmdlet with short descriptions. Click on the links for further details.

UDPDataThis object is created after a UDP packet is received.

Configuration Settings


The following is a list of configuration settings for the cmdlet with short descriptions. Click on the links for further details.

CaptureIPPacketInfoUsed to capture the packet information.
DestinationAddressUsed to get the destination address from the packet information.
DontFragmentUsed to set the Don't Fragment flag of outgoing packets.
LocalHostThe name of the local host through which connections are initiated or accepted.
LocalPortThe port in the local host where the cmdlet binds.
MaxPacketSizeThe maximum length of the packets that can be received.
QOSDSCPValueUsed to specify an arbitrary QOS/DSCP setting (optional).
QOSTrafficTypeUsed to specify QOS/DSCP settings (optional).
ShareLocalPortIf set to True, allows more than one instance of the cmdlet to be active on the same local port.
UseConnectionDetermines whether to use a connected socket.
UseIPv6Whether or not to use IPv6.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
UseInternalSecurityAPITells the cmdlet whether or not to use the system security libraries or an internal implementation.

 
 
Copyright (c) 2021 /n software inc. - All rights reserved.
NetCmdlets 2020 - Version 20.0 [Build 7877]