Send-SFTP ConfigurationThe cmdlet accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the cmdlet, access to these internal properties is provided through the Config method.
SFTP Configuration Settings
Whether backslashes are allowed in folder and file names.By default the backslash character is treated as a path separator and is not allowed in file and folder names. When this configuration setting is set to True, backslashes "\" are allowed in file and folder names, and are not supported as path separators.
The default value is False.
|AsyncTransfer: Controls whether simultatenous requests are made to read or write files.When set to true, the cmdlet will make several requests to read or write data before waiting for a response from the server. The maximum number of these requests that can be made is controlled by MaxOutstandingPackets. The default is true.|
|AttrAccessTime: Can be queried for the AccessTime file attribute during the DirList event.During DirList, this configuration setting can be queried to retrieve the value of the AccessTime file attribute if it is present in the response from the server.|
|AttrCreationTime: Can be queried for the CreationTime file attribute during the DirList event.During DirList, this configuration setting can be queried to retrieve the value of the CreationTime file attribute if it is present in the response from the server.|
|AttrFileType: Can be queried for the FileType file attribute during the DirList event.During DirList, this configuration setting can be queried to retrieve the value of the FileType file attribute if it is present in the response from the server.|
|AttrGroupId: Can be queried for the GroupId file attribute during the DirList event.During DirList, this configuration setting can be queried to retrieve the value of the GroupId file attribute if it is present in the response from the server.|
|AttrLinkCount: Can be queried for the LinkCount file attribute during the DirList event.During DirList, this configuration setting can be queried to retrieve the value of the LinkCount file attribute if it is present in the response from the server.|
|AttrOwnerId: Can be queried for the OwnerId file attribute during the DirList event.During DirList, this configuration setting can be queried to retrieve the value of the OwnerId file attribute if it is present in the response from the server.|
|AttrPermission: Can be queried for the Permissions file attribute during the DirList event.During DirList, this configuration setting can be queried to retrieve the value of the Permissions file attribute if it is present in the response from the server.|
Compares a server-computed hash with a hash calculated locally.This setting may be queried to compare a hash of the file specified by RemoteFile with the hash calculated by the server.
When queried the cmdlet will ask the server to calculate a hash of the file. It will then compute a hash locally and
compare the values to confirm the content that exists in the file specified by RemoteFile is the same as the file specified by LocalFile.
The server must support the check-file extension.
The cmdlet supports the following hash algorithms (in order of preference): sha256,sha224,sha384,sha512,sha1,md5. The server may choose to use any value from this list. No action is needed to configure the algorithm, the cmdlet will automatically use the same algorithm that the server users.
If the extension is unsupported or a mismatch in hashes is detected the cmdlet throws an exception.
|DisableRealPath: Controls whether or not the SSH_FXP_REALPATH request is sent.This configuration setting can be used to skip sending the SSH_FXP_REALPATH request, which asks the server to canonicalize the value in RemotePath to an absolute path. The default value is false, which will cause the component to send the request normally. If set to true, component will not send the SSH_FXP_REALPATH packet and will use the value in RemotePath directly.|
|ExcludeFileMask: Specifies a file mask for excluding files in directory listings.This configuration setting specifies one or more file masks to be excluded during a directory listing. When using multiple masks, any files that match one or more of the masks will not be listed. For example, setting ExcludeFileMask to "*.txt", RemoteFile to "", and calling ListDirectory will list all files except those ending in .txt.|
|FileMaskDelimiter: Specifies a delimiter to use for setting multiple file masks in the RemoteFile property.If specified, the RemoteFile property will be split into separate masks based on the chosen delimiter. The default is "", which will cause the RemoteFile property to be treated as a single value. When using multiple masks, any files that match one or more of the masks will be listed. For example, setting FileMaskDelimiter to "," and setting RemoteFile to "*.txt, *.csv" will list all files ending in .txt or .csv.|
|FiletimeFormat: Specifies the format to use when returning filetime strings.If specified, the cmdlet will use this value to format the filetime string returned through the DirList event. If no format is specified, the cmdlet will format the date dependent on the year. If the filetime is in the same year, it will be formatted as "MMM dd HH:mm", otherwise it will be formatted as "MMM dd yyyy".|
|FreeSpace: The free space on the remote server in bytes.This property is populated after calling the GetSpaceInfo configuration setting. This holds the total free space available on the drive on the remote server in bytes.|
Queries the server for drive usage information.This setting queries the server for the total space and free space available on the remote drive. When querying
this setting the cmdlet will immediately request the information from the server. After calling this setting
the TotalSpace and FreeSpace configuration settings will be populated.
Note: The server must understand either the "firstname.lastname@example.org" or "space-available" extension in order for this operation to succeed.
Whether to get the attributes of the symbolic link, or the resource pointed to by the link.When FileAttributes is queried the cmdlet will retrieve information about the RemoteFile. This setting controls the behavior when RemoteFile refers to a symbolic link on the server. By default the information returned by FileAttributes is that of the actual file pointed to by the symbolic link, not the symbolic link itself.
If it is desired to retrieve the attributes of the symbolic link itself, set GetSymlinkAttrs to True before querying FileAttributes.
|IgnoreFileMaskCasing: Controls whether or not the file mask is case sensitive.This applies to the file mask value specified by the RemoteFile property. The default value is true. If set to false, the file mask will be case sensitive.|
When TransferMode is set, this specifies the line ending for the local system.This setting is only applicable when TransferMode is set to 1 (ASCII).
The default value is a CrLf character sequence.
When uploading or downloading this value will be compared to ServerEOL. If ServerEOL and LocalEOL are different, the line endings in the file being transferred will be converted to the line endings used by the destination. Line endings will be converted to the value in LocalEOL when downloading. Line endings will be converted to the value in ServerEOL when uploading. If ServerEOL and LocalEOL are the same, no conversion takes place.
The value supplied to this setting must be quoted. For instance:
component.Config("LocalEOL=\"" + myEOLSequence + "\"");Where myEOLSequence is a Cr, Lf, or CrLf character sequence.
|LogSFTPFileData: Whether SFTP file data is present in Debug logs.This setting controls whether file data is logged when LogLevel is set to 3 (Debug). When False (default) the file data being transferred is not included. Set this value to True to include all traffic include file data. Note: setting this value to True will increase the amount of data that is logged.|
|MaskSensitive: Masks passwords in logs.The default value is false. When set to true the cmdlet will mask passwords that would otherwise appear in its logs.|
Specifies the maximum payload size of an SFTP packet.While the SSH specification requires servers and clients to support SSH packets of at least 32000 bytes, some server implementations limit packet size to smaller values. MaxFileData provides a means by which the user can specify the maximum amount of data that can be put into an SFTP packet so that the cmdlet can communicate effectively with these servers. If you are having difficulty when uploading to a server, try setting MaxFileData size to a value smaller than 32000.
Most servers that use smaller values will use a maximum SSH packet size of 16KB (16384). In order to most efficiently communicate with such servers, MaxFileData size should be set to 14745.
Note: Values larger than 64K (65536) may not be respected by some servers (such as OpenSSH) and will result in unexpected behavior. If specifying a value, it is recommended to set a value less than or equal to 65536.
The default value is 32768.
|MaxOutstandingPackets: Sets the maximum number of simultaneous read or write requests allowed.This sets the number of simultaneous read or write requests allowed. This setting only applies when MaxOutstandingPackets is true. The default is 8.|
|NegotiatedProtocolVersion: The negotiated SFTP version.This returns the negotiated version of SFTP. Query this to ensure that the correct version was negotiated. This configuration setting is read-only.|
|NormalizeRemotePath: Whether to normalize the RemotePath.When set to true, the component will normalize the value in RemotePath by appending a forward slash (/) if one is not already present. "." and ".." are special cases and will not be affected. The default is true.|
|PreserveFileTime: Preserves the file's timestamps during transfer.If set to True, the cmdlet will preserve the file's timestamps during transfer. This is applicable to both uploads and downloads. The default value is False.|
|ProtocolVersion: The highest allowable SFTP version to use.This governs the highest allowable SFTP version to use when negotiating the version with the server. The default value is 3 as this is the most common version. The cmdlet supports values from 3 to 6. It is recommended to use the default value of 3 unless there is a specific reason a higher version is needed.|
This settings returns the target of a specified symbolic link.This setting returns the target of the specified symbolic link. To use the setting, pass the remote path and file name of the symbolic link. For instance:
string resolvedPath = component.Config("ReadLink=/home/test/mysymlink.txt");
|RealTimeUpload: Enables real time uploading.When this value is set to "True" the cmdlet will upload the data in the file specified by LocalFile and continue monitoring LocalFile for additional data to upload until no new data is found for RealTimeUploadAgeLimit seconds. This allows you to start uploading a file immediately after the file is created and continue uploading as data is written to the file. The default value is "False".|
|RealTimeUploadAgeLimit: The age limit in seconds when using RealTimeUpload.This value is only applicable when RealTimeUpload is set to "True". This specifies the number of seconds for which the cmdlet will monitor LocalFile for new data to upload. If this limit is reached and no new data is found in LocalFile the upload will complete. The default value is "1".|
When TransferMode is set, this specifies the line ending for the remote system.This setting is only applicable when TransferMode is set to 1 (ASCII).
The default value is a CrLf character sequence.
When uploading or downloading this value will be compared to LocalEOL. If ServerEOL and LocalEOL are different, the line endings in the file being transferred will be converted to the line endings used by the destination. Line endings will be converted to the value in LocalEOL when downloading. Line endings will be converted to the value in ServerEOL when uploading. If ServerEOL and LocalEOL are the same, no conversion takes place.
The value supplied to this setting must be quoted. For instance:
component.Config("ServerEOL=\"" + myEOLSequence + "\"");Where myEOLSequence is a Cr, Lf, or CrLf character sequence.
|SimultaneousTransferLimit: The maximum number of simultaneous file transfers.This setting specifies the maximum number of simultaneous file transfers. This is used when processing files added to the transfer queue by QueueFile. The default value is "5".|
|TotalSpace: The total space on the remote server in bytes.This property is populated after calling the GetSpaceInfo configuration setting. This holds the total space on the drive on the remote server in bytes.|
The transfer mode (ASCII or Binary).The value 0 represents Binary and the value 1 represents ASCII. If the value is 0 (default), the initial server mode will be used.
Note: When this value is set to 1 (ASCII) and ProtocolVersion is set to 4 or higher the cmdlet will automatically determine the value for ServerEOL if the server supports the "newline" protocol extension.
Specifies the maximum number of bytes to download from the remote file.This setting specifies the maximum number of bytes which should be downloaded from the current RemoteFile when
Download is called. The cmdlet will stop downloading data if it reaches the specified limit, or if there is
no more data to download.
This setting can be used in conjunction with the StartByte property in order to download a specific range of data from the current RemoteFile.
SSHClient Configuration Settings
|ClientSSHVersionString: The SSH version string used by the cmdlet.This configuration setting specifies the SSH version string used by the cmdlet. The default value is "SSH-2.0-IPWorks SSH Client 2016".|
Whether to use a key stored in Pageant to perform client authentication.This setting controls whether Pageant authentication is disabled, enabled, or required. When enabled or required, the cmdlet attempts to communicate with PuTTY's ssh-agent, called "Pageant", over shared memory to perform public key authentication. Possible values and the corresponding behavior is described below:
Example enabling Pageant:
component.Config("EnablePageantAuth=1"); component.SSHUser = "sshuser"; component.SSHLogon("localhost", 22);
Note: This functionality is only available on Windows.
|KerberosDelegation: If true, asks for credentials with delegation enabled during authentication.The default value is "True". If set to "False", the client will not ask for credentials delegation support during authentication. Note that even if the client asks for delegation, the server/KDC might not grant it and authentication will still succeed.|
|KerberosRealm: The fully qualified domain name of the Kerberos Realm to use for GSSAPI authentication.This property may be set to the fully qualified (DNS) name of the kerberos realm (or Windows Active Directory domain name) to use during GSSAPI authentication. This can be used to force authentication with a given realm if the client and server machines are not part of the same domain.|
|KerberosSPN: The Kerberos Service Principal Name of the SSH host.This property can be set to specify the Service Principal Name (SPN) associated with the SSH service on the remote host. This will usually be in the form "host/fqdn.of.sshhost[@REALM]". If not specified, the cmdlet will assume the SPN is based on the value of the SSHHost property and the kerberos realm used for authentication.|
Sets the threshold for the SSH Key Renegotiation.This property allows you to specify the threshold, in the number of bytes, for the SSH Key Renegotiation.
The default value for this property is set to 1 GB.
Example (for setting the threshold to 500 MB):
Specifies the level of detail that is logged.This setting controls the level of detail that is logged through the Log event. Possible values are:
|MaxPacketSize: The maximum packet size of the channel, in bytes.This setting specifies the maximum size of an individual data packet, in bytes, that can be sent to the sender.|
|MaxWindowSize: The maximum window size allowed for the channel, in bytes.This setting specifies how many bytes of channel data can be sent to the sender of this message without adjusting the window. Note that this value may be changed during the connection, but the window size can only be increased, not decreased.|
The text of the password prompt used in keyboard-interactive authentication.This setting optionally specifies a pattern to be matched to the prompt received from the server
during keyboard-interactive authentication. If a matching prompt is detected the cmdlet
automatically responds to the prompt with the password specified by SSHPassword.
This provides an easy way to automatically reply to prompts with the password if one is presented by the server. The password will be auto-filled in the Response parameter of the SSHKeyboardInteractive event in the case of a match.
The following special characters are supported for pattern matching:
If the above characters need to be used as a literal in a pattern then they must be escaped by surrounding them with a . (Note, "]" and "-" do not need to be escaped) See below for the escape sequences:
For example, to match the value [Something].txt specify the pattern [Something].txt
|PreferredDHGroupBits: The size (in bits) of the preferred modulus (p) to request from the server.This may be when using the diffie-hellman-group-exchange-sha1 or diffie-hellman-group-exchange-sha256 key exchange algorithms to control the preferred size, in bits, of the modulus (p) prime number to request from the server. Acceptable values are between 1024 and 8192.|
The length of received data records.If set to a positive value, this setting defines the length of data records to be received. The cmdlet will accumulate data
until RecordLength is reached and only then fire the DataIn event with data of length RecordLength.
This allows data to be received as records of known length. This value can be changed at any time, including within the DataIn event.
The default value is 0, meaning this setting is not used.
|ServerSSHVersionString: The remote host's SSH version string.This will return the remote host's SSH version string, which can help when identifying problematic servers. This configuration setting is read-only.|
The CA signed client public key used when authenticating.When authenticating via public key authentication this setting may be set to the CA signed client's public key.
This is useful when the server has been configured to trust client keys signed by a particular CA. For instance:
component.Config("SignedSSHCertemail@example.com AAAAB3NzaC1yc2EAAAADAQABAAAB...");The algorithm such as firstname.lastname@example.org in the above string is used as part of the authentication process. To use a different algorithm simply change this value. For instance all of the following are acceptable with the same signed public key:
|SSHAcceptAnyServerHostKey: If set the cmdlet will accept any key presented by the server.The default value is "False". Set this to "True" to accept any key presented by the server.|
The CA public key that signed the server's host key.If the server's host key was signed by a CA, this setting may be used to specify the CA's public key. If specified
the cmdlet will trust any server's host key that was signed by the CA. For instance:
The fingerprint of the server key to accept.This may be set to a comma-delimited collection of 16-byte MD5 fingerprints that should be accepted as the host's key. You may supply it by HEX
encoding the values in the form "0a:1b:2c:3d". Example:
SSHClient.Config("SSHAcceptServerHostKeyFingerprint=0a:1b:2c:3d");If the server's fingerprint matches one of the values supplied, the cmdlet will accept the host key.
The algorithm used to calculate the fingerprint.This configuration setting controls which hash algorithm is used to calculate the hostkey's fingerprint, displayed when SSHServerAuthentication fires.
Valid values are:
|SSHFingerprintMD5: The server hostkey's MD5 fingerprint.This setting may be queried in SSHServerAuthentication to get the server hostkey's MD5 fingerprint.|
|SSHFingerprintSHA1: The server hostkey's SHA1 fingerprint.This setting may be queried in SSHServerAuthentication to get the server hostkey's SHA1 fingerprint.|
|SSHFingerprintSHA256: The server hostkey's SHA256 fingerprint.This setting may be queried in SSHServerAuthentication to get the server hostkey's SHA256 fingerprint.|
|SSHKeepAliveCountMax: The maximum number of keep alive packets to send without a response.This setting specifies the maximum number of keep alive packets to send when no response is received. Normally a response to a keep alive packet is received right away. If no response is received the cmdlet will continue to send keep alive packets until SSHKeepAliveCountMax is reached. If this is reached the cmdlet will assume the connection is broken and disconnect. The default value is 5.|
The interval between keep alive packets.This setting specifies the number of seconds between keep alive packets. If set to a positive value
the cmdlet will send a SSH keep alive packet after KeepAliveInterval seconds of inactivity.
This setting only takes effect when there is no activity, if any data is sent or received over the connection
it will reset the timer.
The default value is 0 meaning no keep alives will be sent.
Note: The SSHREVERSETUNNEL cmdlet uses a default value of 30.
Specifies the supported key exchange algorithms.This may be used to specify the list of supported Key Exchange algorithms used during SSH negotiation. The value should contain
a comma separated list of algorithms. Supported algorithms are:
Causes the component to renegotiate the SSH keys.Once this setting is set the component will renegotiate the SSH keys with the remote host.
Specifies the supported Mac algorithms.This may be used to specify an alternate list of supported Mac algorithms used during SSH negotiation. This also specifies the order in which the Mac algorithms are preferred.
The value should contain a comma separated list of algorithms. Supported algorithms are:
Specifies the signature algorithm when attempting public key authentication.This setting specifies a list of signature algorithms that may be used when authenticating
to the server using public key authentication. This applies only when public key authentication
is performed by the client.
The setting should be a comma separated list of algorithms ordered by preference. At runtime the cmdlet will evaluate each algorithm in the order specified here. If the algorithm is applicable to the certificate specified in SSHCert it will be used. If the algorithm is not applicable the cmdlet will evaluate the next algorithm. Possible values are:
The default value in Windows is ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521.
The default value in Unix/macOS/Java is ssh-rsa,ssh-dss.
Note that ECDSA algorithms are only supported in Windows.
Specifies the supported public key algorithms.
This setting specifies the allowed public key algorithms. This list controls only the public key
algorithm used when authenticating to the server. This list has no bearing on the public key algorithms
that can be used to authenticate the client. The default value is ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss,x509v3-sign-rsa,x509v3-sign-dss.
The pattern used to match the remote host's version string.This configuration setting specifies the pattern used to accept or deny the remote host's SSH version string. It takes a comma-delimited list of patterns to match. The default value is "*SSH-1.99-*,*SSH-2.0-*" and will accept connections from SSH 1.99 and 2.0 hosts. As an example, the below value would accept connections for SSH 1.99, 2.0, and 2.99 hosts.
|TryAllAvailableAuthMethods: If set to true, the cmdlet will try all available authentication methods.The default value is false. When set to true, the cmdlet will try to authenticate using all methods that it has credentials for and the server supports.|
Whether to wait for channels to be closed before disconnected.This setting controls whether the cmdlet will wait for a server response to the SSH_MSG_CHANNEL_CLOSE when disconnecting. When the cmdlet disconnects it will first attempt to close all open channels by sending a SSH_MSG_CHANNEL_CLOSE for each channel. This setting controls whether the cmdlet will wait for a server response after sending the messages.
When True (default) the cmdlet will wait for a response to the channel close message until the responses have been received, the server closes the connection, or Timeout seconds is reached.
When False the cmdlet will still send the channel close messages but will not wait for a response and will proceed to close the connection.
Whether to wait for the server to close the connection.This setting controls whether to wait for the server to close the connection when SSHLogoff is called.
When set to True the cmdlet will initiate the disconnection sequence by sending SSH_MSG_DISCONNECT but will not close the connection, and instead will wait for the server to close the connection. Setting this to True may be beneficial in circumstances where many connections are being established, to avoid port exhaustion when sockets are in a TIME_WAIT state. Allowing the server to close the connection avoids the TIME_WAIT state of socket on the client machine.
When set to False (default) the client will close the connection. It is recommended to use this value unless there is a specific need to change it.
IPPort Configuration Settings
|ConnectionTimeout: Sets a separate timeout value for establishing a connection.When set, this configuration setting allows you to specify a different timeout value for establishing a connection. Otherwise, the cmdlet will use Timeout for establishing a connection and transmitting/receiving data.|
|FirewallAutoDetect: Tells the cmdlet whether or not to automatically detect and use firewall system settings, if available.This is the same as FirewallAutoDetect. This setting is provided for use by cmdlets that do not directly expose Firewall properties.|
Name or IP address of firewall (optional).If a FirewallHost is given, requested connections will be authenticated through the specified firewall
If the FirewallHost setting is set to a Domain Name, a DNS request is initiated. Upon successful termination of the request, the FirewallHost setting is set to the corresponding address. If the search is not successful, an error is returned.
NOTE: This is the same as FirewallHost. This setting is provided for use by cmdlets that do not directly expose Firewall properties.
Password to be used if authentication is to be used when connecting through the firewall.If FirewallHost is specified, the FirewallUser and FirewallPassword settings
are used to connect and authenticate to the given firewall. If the authentication fails, the cmdlet throws an exception.
NOTE: This is the same as FirewallPassword. This setting is provided for use by cmdlets that do not directly expose Firewall properties.
The TCP port for the FirewallHost;.Note that the FirewallPort is set automatically when FirewallType is set to a valid value.
NOTE: This is the same as FirewallPort. This setting is provided for use by cmdlets that do not directly expose Firewall properties.
Determines the type of firewall to connect through.The appropriate values are as follows:
NOTE: This is the same as FirewallFirewallType. This setting is provided for use by cmdlets that do not directly expose Firewall properties.
A user name if authentication is to be used connecting through a firewall.If the FirewallHost is specified, the FirewallUser and FirewallPassword
settings are used to connect and authenticate to the Firewall. If the authentication fails, the cmdlet throws an exception.
NOTE: This is the same as FirewallUser. This setting is provided for use by cmdlets that do not directly expose Firewall properties.
The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.When set, TCPKeepAlive will automatically be set to true.
A TCP keep-alive packet will be sent after a period of inactivity as
defined by KeepAliveTime. If no acknowledgement is received from the remote host the keep-alive packet
will be re-sent. This setting specifies the interval at which the successive keep-alive packets are sent in milliseconds.
This system default if this value is not specified here is 1 second.
Note: This value is not applicable in Java or MAC.
The inactivity time in milliseconds before a TCP keep-alive packet is sent.When set, TCPKeepAlive will automatically be set to true.
By default the operating system will determine the
time a connection is idle before a TCP keep-alive packet is sent. This system default if this value is not specified here is 2 hours. In many
cases a shorter interval is more useful. Set this value to the desired interval in milliseconds.
Note: This value is not applicable in Java.
When set to True, connections are terminated gracefully.This property controls how a connection is closed. The default is True.
In the case that Linger is True (default), there are two scenarios for determining how long the connection will linger. The first, if LingerTime is 0 (default), the system will attempt to send pending data for a connection until the default IP protocol timeout expires.
In the second scenario, LingerTime is a positive value, the system will attempt to send pending data until the specified LingerTime is reached. If this attempt fails, then the system will reset the connection.
The default behavior (which is also the default mode for stream sockets) might result in a long delay in closing the connection. Although the cmdlet returns control immediately, the system could hold system resources until all pending data is sent (even after your application closes).
Setting this property to False forces an immediate disconnection. If you know that the other side has received all the data you sent (by a client acknowledgment, for example), setting this property to False might be the appropriate course of action.
|LingerTime: Time in seconds to have the connection linger. LingerTime is the time, in seconds, to leave the socket connection linger. This value is 0 by default, which means it will use the default IP protocol timeout.|
The name of the local host through which connections are initiated or accepted.
The LocalHost setting contains the name of the local host
as obtained by the gethostname() system call, or if the
user has assigned an IP address, the value of that address.
In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the cmdlet initiate connections (or accept in the case of server cmdlets) only through that interface.
If the cmdlet is connected, the LocalHost setting shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).
The port in the local host where the cmdlet binds.
This must be set before a connection is
attempted. It instructs the cmdlet to bind to a specific
port (or communication endpoint) in the local machine.
Setting this to 0 (default) enables the system to choose a port at random. The chosen port will be shown by LocalPort after the connection is established.
LocalPort cannot be changed once a connection is made. Any attempt to set this when a connection is active will generate an error.
This; setting is useful when trying to connect to services that require a trusted port in the client side. An example is the remote shell (rsh) service in UNIX systems.
The maximum amount of data to accumulate when no EOL is found.MaxLineLength is the size of an internal buffer, which holds received data while waiting for an EOL
If an EOL string is found in the input stream before MaxLineLength bytes are received, the DataIn event is fired with the EOL parameter set to True, and the buffer is reset.
If no EOL is found, and MaxLineLength bytes are accumulated in the buffer, the DataIn event is fired with the EOL parameter set to False, and the buffer is reset.
The minimum value for MaxLineLength is 256 bytes. The default value is 2048 bytes.
|MaxTransferRate: The transfer rate limit in bytes per second.This setting can be used to throttle outbound TCP traffic. Set this to the number of bytes to be sent per second. By default this is not set and there is no limit.|
A semicolon separated list of hosts and IPs to bypass when using a proxy.This setting optionally specifies a semicolon separated list of hostnames or IP addresses to bypass when a proxy is in use.
When requests are made to hosts specified in this property the proxy will not be used. For instance:
Determines whether or not the keep alive socket option is enabled.If set to true, the socket's keep-alive option is enabled and keep-alive packets will be sent periodically
to maintain the connection. Set KeepAliveTime and KeepAliveInterval to
configure the timing of the keep-alive packets.
Note: This value is not applicable in Java.
Whether or not to delay when sending packets.
When true, the socket will send all data that is ready to send at once. When
false, the socket will send smaller buffered packets of data at small intervals.
This is known as the Nagle algorithm.
By default, this config is set to false.
Whether to use IPv6.When set to 0 (default), the cmdlet will use IPv4 exclusively.
When set to 1, the cmdlet will use IPv6 exclusively. To instruct the cmdlet to prefer IPv6 addresses, but use IPv4 if IPv6 is not supported on the system, this setting should be set to 2. The default value is 0.
Possible values are:
Socket Configuration Settings
Determines whether timeouts are inactivity timeouts or absolute timeouts.If AbsoluteTimeout is set to True, any method which does not complete within Timeout seconds
will be aborted. By default, AbsoluteTimeout is False, and the timeout is an inactivity timeout.
Note: This option is not valid for UDP ports.
|FirewallData: Used to send extra data to the firewall.When the firewall is a tunneling proxy, use this property to send custom (additional) headers to the firewall (e.g. headers for custom authentication schemes).|
The size in bytes of the incoming queue of the socket.
This is the size of an internal queue in the TCP/IP stack.
You can increase or decrease its size depending on the amount
of data that you will be receiving. Increasing the value of the
InBufferSize setting can provide significant improvements in
performance in some cases.
Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the cmdlet is activated the InBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.
The size in bytes of the outgoing queue of the socket.This is the size of an internal queue in the TCP/IP stack.
You can increase or decrease its size depending on the amount
of data that you will be sending. Increasing the value of the
OutBufferSize setting can provide significant improvements in
performance in some cases.
Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the cmdlet is activated the OutBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.
Base Configuration Settings
Tells the cmdlet whether or not to use the system security libraries or an internal implementation.
By default the cmdlet will use the system security libraries to perform cryptographic functions.
When set to False calls to unmanaged code will be made. In certain environments this is not desirable.
To use a completely managed security implementation set this setting to True.
Setting this to True tells the cmdlet to use the internal implementation
instead of using the system's security API.
Note: This setting is static. The value set is applicable to all cmdlets used in the application.
When this value is set the product's system DLL is no longer required as a reference, as all unmanaged code is stored in that file.