Connect-TCPCmdlet
Parameters Output Objects Config Settings
The Connect-TCP cmdlet is used to create a persistent connection object.
Syntax
$cnn = Connect-TCP [parameters]
Remarks
This cmdlet allows you to create a persistent connection object to be used with related cmdlets.When executing the cmdlet a connection object is returned. Pass this object to the Connection parameter of related cmdlets to use the newly created connection object.
To disconnect call Disconnect-TCP.
Parameter List
The following is the full list of the parameters of the cmdlet with short descriptions. Click on the links for further details.
LogFile | The location of a file to which debug information is written. |
Config | Specifies one or more configuration settings. |
FirewallHost | Name or IP address of firewall. |
FirewallPassword | A password if authentication is to be used when connecting through the firewall. |
FirewallPort | The port of the firewall to which to connect. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
LocalIP | The IP address of the local interface to use. |
LocalPort | The local port that the component should use. |
LogFile | The location of a file to which debug information is written. |
Port | The port to be used. |
Server | The address of the Server. |
Timeout | The 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.
TCPConnection | The connection object. |
Config Settings
The following is a list of config settings for the cmdlet with short descriptions. Click on the links for further details.
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
FirewallAutoDetect | Tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The port in the local host where the component binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
ProxyExceptionsList | A semicolon separated list of hosts and IPs to bypass when using a proxy. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
TcpNoDelay | Whether or not to delay when sending packets. |
UseIPv6 | Whether to use IPv6. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
BuildInfo | Information about the product's build. |
CodePage | The system code page used for Unicode to Multibyte translations. |
LicenseInfo | Information about the current license. |
MaskSensitive | Whether sensitive data is masked in log messages. |
UseInternalSecurityAPI | Tells the component whether or not to use the system security libraries or an internal implementation. |
LogFile Parameter (Connect-TCP Cmdlet)
The location of a file to which debug information is written.
Syntax
Connect-TCP -LogFile string
Remarks
When specified, the cmdlet will log debug information to the file. If the file exists, the information will be appended.Default Value
null
Config Parameter (Connect-TCP Cmdlet)
Specifies one or more configuration settings.
Syntax
Connect-TCP -Config string[]
Remarks
Default Value
null
DataToSend Parameter (Connect-TCP Cmdlet)
The data to send to the server.
Syntax
Connect-TCP -DataToSend string
Remarks
Default Value
""
EOL Parameter (Connect-TCP Cmdlet)
The EOL used to parse the response.
Syntax
Connect-TCP -EOL string
Remarks
Default Value
"'r'n"
FirewallHost Parameter (Connect-TCP Cmdlet)
Name or IP address of firewall.
Syntax
Connect-TCP -FirewallHost string
Remarks
Default Value
""
FirewallPassword Parameter (Connect-TCP Cmdlet)
A password if authentication is to be used when connecting through the firewall.
Syntax
Connect-TCP -FirewallPassword string
Remarks
Default Value
""
FirewallPort Parameter (Connect-TCP Cmdlet)
The port of the firewall to which to connect.
Syntax
Connect-TCP -FirewallPort int
Remarks
Default Value
0
FirewallType Parameter (Connect-TCP Cmdlet)
Determines the type of firewall to connect through.
Syntax
Connect-TCP -FirewallType string
Remarks
Default Value
0
FirewallUser Parameter (Connect-TCP Cmdlet)
A user name if authentication is to be used connecting through a firewall.
Syntax
Connect-TCP -FirewallUser string
Remarks
Default Value
""
LocalIP Parameter (Connect-TCP Cmdlet)
The IP address of the local interface to use.
Syntax
Connect-TCP -LocalIP string
Remarks
Default Value
""
Parameter Alias
LocalAddress
LocalPort Parameter (Connect-TCP Cmdlet)
The local port that the component should use.
Syntax
Connect-TCP -LocalPort int
Remarks
Default Value
0
LogFile Parameter (Connect-TCP Cmdlet)
The location of a file to which debug information is written.
Syntax
Connect-TCP -LogFile string
Remarks
Default Value
""
NoTimeoutError Parameter (Connect-TCP Cmdlet)
If enabled, reaching the timeout will not throw an error.
Syntax
Connect-TCP -NoTimeoutError SwitchParameter
Remarks
Default Value
false
Port Parameter (Connect-TCP Cmdlet)
The port to be used.
Syntax
Connect-TCP -Port int
Remarks
Default Value
23
Server Parameter (Connect-TCP Cmdlet)
The address of the Server.
Syntax
Connect-TCP -Server string
Remarks
Default Value
""
Parameter Position
0
This is a required parameter.
Timeout Parameter (Connect-TCP Cmdlet)
The maximum time allowed for the operation.
Syntax
Connect-TCP -Timeout int
Remarks
Default Value
60
TCPConnection Output Object (Connect-TCP Cmdlet)
The connection object.
Syntax
Object TCPConnection {string[] Config;
string FirewallHost;
string FirewallPassword;
int FirewallPort;
string FirewallType;
string FirewallUser;
string LocalIP;
int LocalPort;
string LogFile;
int Port;
string Server;
int Timeout;
}