NetCmdlets 2016
NetCmdlets 2016
Questions / Feedback?

Get-FTP Configuration

The 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.

Get-FTP Configuration Settings

UseFSwitch:   Specifies whether or not the -F parameter is used when listing directory contents.

This is only applicable when UseSimpleDirList is set to true. When UseSimpleDirList is true, the adapter issues the command "NLST -F <filemask>". The -F parameter tells the server to omit folder names from the response. Some servers do not support the -F parameter. To disable the use of the -F parameter set UseFSwitch to False. The default value is True.

UseSimpleDirList:   Instructs the adapter to issue the NLST command instead of LIST.

When this is set to true, the adapter will send the NLST command to the server. This tells the server to return a more simply formatted listing. If the server's directory listing cannot be parsed when this is false, setting this to true will be helpful.

FTP Configuration Settings

ActiveModePORTAddress:   Allows the specification of the PORT address value for active mode connections.

When using an active mode configuration (Passive = False) with a firewall, it may sometimes be necessary to specify the actual PORT value to be sent to the server. ActiveModePORTAddress takes the protocol-level parameter in the form "a,b,c,d,e,f" where "a,b,c,d" is the external IP address separated by commas, and e and f represent, respectively, the high byte (divide by 256) and the low byte (mod 256) values of the external port where the FTP client is listening.

This config must be used in conjunction with PortRange to ensure that the correct port is used by the client.

ActiveModeIP:   Allows the specification of the IP address that the server will connect to for active mode connections.

The ActiveModeIP config can be used to specify the IP address that the server will connect to when using an active mode configuration (Passive = False). When this config is set, the port number where the component listens for active mode connections will still be managed by the component. The PortRange can also be used to ensure that the correct port is used by the client.

Note that this config will be ignored if ActiveModePORTAddress is also specified.

AppendToLocalFile:   Append downloaded files to a local file.

If set to true, the downloaded files will be appended to the file specified in LocalFile.

AutoSelectDataIP:   Automatically select the data connection IP.

This setting controls the selection logic of the data connection. By default this value is True and the cmdlet will attempt to determine the best IP for the data connection based on the returned value from the server. It is recommended to leave this value set to True unless there is a reason to disable it.

In many cases FTP servers are not configured to return a valid public IP in the PASV response. When SSL/TLS is used any NAT done by the firewall cannot occur and the result is the client may receive an IP that is not accessible.

This setting is designed to allow the connection to succeed in as many cases as possible. When the IP for the data connection is received from the server the cmdlet will inspect the value. If the received value is not within the known private IP ranges the cmdlet will use it, assuming it is a valid public IP. If the received value is a private IP the cmdlet will instead assume the data connection should be established to the same IP as the command connection (true in almost all cases).

When this setting if False, the cmdlet will not perform any checks on the received value. When set to False UseRemoteHostAddressForPassive is applicable.

CalculatePercentDone:   Enables or Disables calculating the percent complete for downloads.

When set to True, the cmdlet sends an FTP "SIZE" command to retrieve the file size before beginning a download. When downloading a large quantity of small files, performance may be increased by disabling this feature.

CheckTotalEntry:   Whether to ignore directory listing total lines.

Some servers will include "total" information when returning a directory listing that contains some non-entry data. When CheckTotalEntry is set to True (default), the component will ignore lines beginning with "total" to account for this. In some cases, it may be desirable to include these lines in the resulting DirList data; this can be done by setting this configuration setting to False.

DILinger:   When set to True, DI connections are terminated gracefully.

This property controls how the DI connection is closed. The default is True.

In the case that DILinger is True (default), there are two scenarios for determining how long the connection will linger. The first, if DILingerTime 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, DILingerTime is a positive value, the system will attempt to send pending data until the specified DILingerTime 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.

DILingerTime:   Time in seconds to have the DI 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.

IgnoreEntries:   Directory entry data to ignore.

Sometimes the FTP server will return data in a directory listing that is not entry data and can be ignored. The IgnoreEntries configuration setting takes a comma-separated list of entries to ignore. Only the beginning of the entries need to be specified and correct case is not required.

FileTimeFormat:   The format of file time reported by the server.

The default value is "M/d/yyyy hh:mm:ss tt". When set, the cmdlet will format the time returned by the server in the FileTime property. To disable all formatting set this to empty string.

Note: This setting only applies to the FileTime property. It does not apply to the FileTime parameter of the DirList event.

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.

PortRange:   Allows the specification of a port range where the cmdlet listens for active mode connections.

When set to use active mode (Passive = False), the cmdlet uses any available port to listen to incoming connections from the server. You can override this behavior by setting PortRange to a value containing the range of ports the cmdlet will be listening to.

The range is provided as start-end, for instance: "1024-" stands for anything higher than 1024, "1024-2048" stands for ports between 1024 and 2048 inclusive, "4000-4010, 50000-50010" stands for ports between 4000 and 4010 or between 50000 and 50010.

PreserveFileTime:   Attempts to preserve timestamps when transferring files.

When set to True, the cmdlet will try to preserve timestamps when transferring files. The MDTM command is used when downloading, and the MFTM command is used when uploading. The server must support these commands for this to work. False by default.

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".

ReuseSSLSessionInDI:   Whether the SSL session will be reused for the DI connection.

When set to True (default), the cmdlet will ask the server to reuse the existing DI SSL session. When set to False, a new SSL session will always be created for the DI connection.

ReusePISSLSessionInDI:   Whether the PI SSL session will be reused for the DI connection.

When set to True (default), the cmdlet will reuse the PI SSL session when creating the DI connection. When set to False, the cmdlet will create a separate SSL session for the DI connection. The default value is True.

UseEPSV:   Allows extended passive mode.

When set, extended passive mode will be used.

UseMLSD:   Uses listings for machine processing.

When this is set to True the cmdlet will list files in the directory using the MLSD command. This command is an extension to the protocol which defines a more standardized and reliable directory listing format. Not all servers support this command. The default value is False.

When set to True, set RemoteFile to the filemask and call either ListDirectory or ListDirectoryLong. There is no difference between the two methods when this setting is enabled.

UseMLST:   Uses single file listing for machine processing.

This setting is similar to UseMLSD except that it is only valid for a single file. When this is set to True the cmdlet will list the file or folder specified by RemoteFile. If RemoteFile is not set, a listing for the current directory itself will be returned. This command is an extension to the protocol which defines a more standardized and reliable directory listing format, but for a single file or folder only. Not all servers support this command. The default value is False.

When set to True, set RemoteFile to the file or folder you wish to get information about and call either ListDirectory or ListDirectoryLong. There is no difference between the two methods when this setting is enabled. When both UseMLSD and UseMLST are set, UseMLSD takes precedence.

UseModeZ:   Allows compression to be used when transferring data.

The default value is false. When set to true the cmdlet will issue the "MODE Z" command to the FTP server. This will enable deflate compression so all data transferred is first compressed either by the server (when downloading) or by the cmdlet (when uploading). Note that not all servers support this feature.

ModeZCompressionLevel:   Used to specify the level of compression used.

The default value is 7. Valid values are from 0 to 9. A higher value indicates a higher compression level is used. This is only valid when UseModeZ is set to True.

UseRemoteHostAddressForPassive:   Instructs the cmdlet to use the address specified by RemoteHost when establishing a data connection.

When this setting is True, the cmdlet will use the address specified by RemoteHost when establishing a data connection for directory listings and file transfers. This setting is only applicable when AutoSelectDataIP is set to False.

When this setting if False (default) and AutoSelectDataIP is also False the cmdlet will use the IP address returned by the server when establishing a data connection.

This setting is not applicable when Passive is set to False (Active mode).

UseClearChannel:   Allows for the Clear Command Channel (CCC) command.

When set, the cmdlet will send the CCC command to the server requesting a clear (unprotected) command channel.

UseClearDataChannel:   Allows for the PROT C command.

When this is set, the cmdlet will use a clear (unprotected) data channel by sending the PROT C command to the server.

UseOldAUTHSSL:   Allows use of the 'AUTH SSL' command instead of 'AUTH TLS'.

By default, the cmdlet uses the standard "AUTH TLS" command to initiate the SSL handshake with the server. This configuration setting is included for optional support of older servers which support only the "AUTH SSL". command.

Using "AUTH SSL" instead of "AUTH TLS" is STRONGLY discouraged due to potential security vulnerabilities. If you must use this configuration setting, please do so very carefully.

UseProtWhenImplicit:   Sends the PROT P command to the server.

When SSLStartMode is set to sslImplicit, setting this to true will instruct the cmdlet to send the PROT P command to the server. This explicitly tells the server that the data channel will be protected. The default value is true.

VirtualHostName:   Sends the HOST command to the server.

Defined in RFC 7151, the HOST command allows user-FTP processes to specify which virtual host to connect to for a server-FTP process that is handling requests for multiple virtual hosts on a single IP address. When this config is set, the HOST command is sent to the server prior to authenticating.

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.

FirewallHost:   Name or IP address of firewall (optional).

If a FirewallHost is given, requested connections will be authenticated through the specified firewall when connecting.

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.

FirewallPassword:   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.

FirewallPort:   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.

FirewallType:   Determines the type of firewall to connect through.

The appropriate values are as follows:

0No firewall (default setting).
1Connect through a tunneling proxy. FirewallPort is set to 80.
2Connect through a SOCKS4 Proxy. FirewallPort is set to 1080.
3Connect through a SOCKS5 Proxy. FirewallPort is set to 1080.

NOTE: This is the same as FirewallFirewallType. This setting is provided for use by cmdlets that do not directly expose Firewall properties.

FirewallUser:   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.

KeepAliveTime:   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.

KeepAliveInterval:   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.

Linger:   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.

LocalHost:   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).

LocalPort:   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.

MaxLineLength:   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 string.

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. The maximum value is 65536 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.

ProxyExceptionsList:   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:

www.google.com;www.nsoftware.com

TCPKeepAlive:   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.

UseIPv6:   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:

0 IPv4 Only
1 IPv6 Only
2 IPv6 with IPv4 fallback

TcpNoDelay:   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.

Socket Configuration Settings

AbsoluteTimeout:   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).

InBufferSize:   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.

OutBufferSize:   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

UseBackgroundThread:   Whether threads created by the cmdlet are background threads.

If set to True, when the cmdlet creates a thread the thread's IsBackground property will be explicitly set to True. By default this setting is False.

UseInternalSecurityAPI:   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.

 
 
Copyright (c) 2019 /n software inc. - All rights reserved.
NetCmdlets 2016 - Version 16.0 [Build 7240]