Send-TCP Cmdlet

Parameters   Output Objects   Configuration Settings  

The Send-TCP cmdlet provides an easy way to send data over a raw TCP connection.

Syntax

Send-TCP [parameters]

Remarks

This cmdlet implements a simple TCP client. This allows you to connect to a TCP server and send a command by specifying DataToSend. The cmdlet will then wait for a response until the character sequence matching EOL is found. The response will be provided through a TcpResponse output. For example:


$myResponse = send-tcp -Server RemoteMachine -DataToSend testData

Connection Handling

This cmdlet supports persistent connections through the Connection parameter. To establish a new TCP connection, use the Connect-TCP cmdlet. To close the connection, use the Disconnect-TCP cmdlet.

Parameter List


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

ConnectionAn already established connection.
LogFileThe location of a file to which debug information is written.
ConfigSpecifies one or more configuration settings.
DataToSendThe data to send to the server.
EOLThe EOL used to parse the response.
FirewallHostName or IP address of firewall.
FirewallPasswordA password if authentication is to be used when connecting through the firewall.
FirewallPortThe port of the firewall to which to connect.
FirewallTypeDetermines the type of firewall to connect through.
FirewallUserA user name if authentication is to be used connecting through a firewall.
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.
NoTimeoutErrorIf enabled, reaching the timeout will not throw an error.
PortThe port to be used.
ServerThe address of the Server.
TimeoutThe maximum time allowed for the operation.

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.

TcpResponseObject containing part or all of the response from server.

Configuration Settings


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

ConnectionTimeoutSets a separate timeout value for establishing a connection.
FirewallAutoDetectTells the cmdlet whether or not to automatically detect and use firewall system settings, if available.
FirewallHostName or IP address of firewall (optional).
FirewallPasswordPassword to be used if authentication is to be used when connecting through the firewall.
FirewallPortThe TCP port for the FirewallHost;.
FirewallTypeDetermines the type of firewall to connect through.
FirewallUserA user name if authentication is to be used connecting through a firewall.
KeepAliveIntervalThe retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.
KeepAliveTimeThe inactivity time in milliseconds before a TCP keep-alive packet is sent.
LingerWhen set to True, connections are terminated gracefully.
LingerTimeTime in seconds to have the connection linger.
LocalHostThe name of the local host through which connections are initiated or accepted.
LocalPortThe port in the local host where the cmdlet binds.
MaxLineLengthThe maximum amount of data to accumulate when no EOL is found.
MaxTransferRateThe transfer rate limit in bytes per second.
ProxyExceptionsListA semicolon separated list of hosts and IPs to bypass when using a proxy.
TCPKeepAliveDetermines whether or not the keep alive socket option is enabled.
TcpNoDelayWhether or not to delay when sending packets.
UseIPv6Whether 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]