Connect-FTPCmdlet

Parameters   Output Objects   Config Settings  

The Connect-FTP cmdlet is used to create a persistent connection object.

Syntax

$cnn = Connect-FTP [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-FTP.

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.
ActiveModeControls whether to direct the server into active mode.
AfterConnectA set of FTP commands to be executed immediately after connecting to the Server .
AuthModeThe type of authentication used by the component.
CertPasswordThe password to the certificate store.
CertStoreThe name of the certificate store for the client certificate.
CertStoreTypeThe type of certificate store for the client certificate.
CertSubjectThe subject of the certificate used for client authentication.
ConfigSpecifies one or more configuration settings.
CredentialThe PSCredential object to use for user/password authentication.
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.
ForceForces the component to accept the default behavior instead of querying the user.
LocalIPThe IP address of the local interface to use.
LogFileThe location of a file to which debug information is written.
PasswordThe password to use for authentication.
PortThe TCP port in the remote host to which to connect.
ServerThe address of the Server.
SSLDetermines how the component starts SSL negotiation.
SSLAcceptThe encoded public key of the certificate which is to be trusted explicitly.
TimeoutThe maximum time allowed for the operation.
UserThe username to use for authentication.

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.

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

UseFSwitchSpecifies whether or not the -F parameter is used when listing directory contents.
UseSimpleDirListInstructs the adapter to issue the NLST command instead of LIST.
ActiveModeIPAllows the specification of the IP address that the server will connect to for active mode connections.
ActiveModePORTAddressAllows the specification of the PORT address value for active mode connections.
AppendToLocalFileAppend downloaded files to a local file.
ApplyFileMaskLocallyWhether to filter the directory listing locally or on the server.
AutoSelectDataIPAutomatically select the data connection IP.
CalculatePercentDoneEnables or Disables calculating the percent complete for downloads.
CheckTotalEntryWhether to ignore directory listing total lines.
DILingerWhen set to True, DI connections are terminated gracefully.
DILingerTimeTime in seconds to have the DI connection linger.
FileTimeFormatThe format of file time reported by the server.
IgnoreEntriesDirectory entry data to ignore.
MaskSensitiveMasks passwords in logs.
ModeZCompressionLevelUsed to specify the level of compression used.
PortRangeAllows the specification of a port range where the component listens for active mode connections.
PreserveFileTimeAttempts to preserve timestamps when transferring files.
RealTimeUploadEnables real time uploading.
RealTimeUploadAgeLimitThe age limit in seconds when using RealTimeUpload.
ReusePISSLSessionInDIWhether the PI SSL session will be reused for the DI connection.
ReuseSSLSessionInDIWhether the SSL session will be reused for the DI connection.
UseClearChannelAllows for the Clear Command Channel (CCC) command.
UseClearDataChannelAllows for the PROT C command.
UseEPSVAllows extended passive mode.
UseMLSDUses listings for machine processing.
UseMLSTUses single file listing for machine processing.
UseModeZAllows compression to be used when transferring data.
UseOldAUTHSSLAllows use of the 'AUTH SSL' command instead of 'AUTH TLS'.
UseProtWhenImplicitSends the PROT P command to the server.
UseRemoteHostAddressForPassiveInstructs the component to use the address specified by RemoteHost when establishing a data connection.
VirtualHostNameSends the HOST command to the server.
ConnectionTimeoutSets a separate timeout value for establishing a connection.
FirewallAutoDetectTells the component 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 component 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.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
MaskSensitiveWhether sensitive data is masked in log messages.
UseInternalSecurityAPITells the component whether or not to use the system security libraries or an internal implementation.

LogFile Parameter (Connect-FTP Cmdlet)

The location of a file to which debug information is written.

Syntax

Connect-FTP -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

ActiveMode Parameter (Connect-FTP Cmdlet)

Controls whether to direct the server into active mode.

Syntax

Connect-FTP -ActiveMode SwitchParameter

Remarks

Default Value

false

AfterConnect Parameter (Connect-FTP Cmdlet)

A set of FTP commands to be executed immediately after connecting to the Server .

Syntax

Connect-FTP -AfterConnect string[]

Remarks

Default Value

null

AfterDownload Parameter (Connect-FTP Cmdlet)

A set of FTP commands to be executed immediately after each file downloaded.

Syntax

Connect-FTP -AfterDownload string[]

Remarks

Default Value

null

AuthMode Parameter (Connect-FTP Cmdlet)

The type of authentication used by the component.

Syntax

Connect-FTP -AuthMode string

Remarks

Default Value

2

BeforeDownload Parameter (Connect-FTP Cmdlet)

A set of FTP commands to be executed immediately before each file is downloaded.

Syntax

Connect-FTP -BeforeDownload string[]

Remarks

Default Value

null

Binary Parameter (Connect-FTP Cmdlet)

Forces binary transfer mode for FTP and FTPS connections.

Syntax

Connect-FTP -Binary SwitchParameter

Remarks

Default Value

false

Parameter Alias

TransferMode

CertPassword Parameter (Connect-FTP Cmdlet)

The password to the certificate store.

Syntax

Connect-FTP -CertPassword string

Remarks

Default Value

""

Parameter Alias

CertificatePassword

CertStore Parameter (Connect-FTP Cmdlet)

The name of the certificate store for the client certificate.

Syntax

Connect-FTP -CertStore string

Remarks

Default Value

"MY"

Parameter Alias

CertificateStore

CertStoreType Parameter (Connect-FTP Cmdlet)

The type of certificate store for the client certificate.

Syntax

Connect-FTP -CertStoreType string

Remarks

Default Value

0

CertSubject Parameter (Connect-FTP Cmdlet)

The subject of the certificate used for client authentication.

Syntax

Connect-FTP -CertSubject string

Remarks

Default Value

"*"

Config Parameter (Connect-FTP Cmdlet)

Specifies one or more configuration settings.

Syntax

Connect-FTP -Config string[]

Remarks

Default Value

null

Credential Parameter (Connect-FTP Cmdlet)

The PSCredential object to use for user/password authentication.

Syntax

Connect-FTP -Credential PSCredential

Remarks

Default Value

null

Parameter Position

1

Parameter Alias

auth

FirewallHost Parameter (Connect-FTP Cmdlet)

Name or IP address of firewall.

Syntax

Connect-FTP -FirewallHost string

Remarks

Default Value

""

FirewallPassword Parameter (Connect-FTP Cmdlet)

A password if authentication is to be used when connecting through the firewall.

Syntax

Connect-FTP -FirewallPassword string

Remarks

Default Value

""

FirewallPort Parameter (Connect-FTP Cmdlet)

The port of the firewall to which to connect.

Syntax

Connect-FTP -FirewallPort int

Remarks

Default Value

0

FirewallType Parameter (Connect-FTP Cmdlet)

Determines the type of firewall to connect through.

Syntax

Connect-FTP -FirewallType string

Remarks

Default Value

0

FirewallUser Parameter (Connect-FTP Cmdlet)

A user name if authentication is to be used connecting through a firewall.

Syntax

Connect-FTP -FirewallUser string

Remarks

Default Value

""

Force Parameter (Connect-FTP Cmdlet)

Forces the component to accept the default behavior instead of querying the user.

Syntax

Connect-FTP -Force SwitchParameter

Remarks

Default Value

false

List Parameter (Connect-FTP Cmdlet)

Get a directory listing for the path and file mask specified.

Syntax

Connect-FTP -List string

Remarks

Default Value

""

Parameter Alias

Path

LocalFile Parameter (Connect-FTP Cmdlet)

The local file to download to.

Syntax

Connect-FTP -LocalFile string

Remarks

Default Value

""

LocalIP Parameter (Connect-FTP Cmdlet)

The IP address of the local interface to use.

Syntax

Connect-FTP -LocalIP string

Remarks

Default Value

""

Parameter Alias

LocalAddress

LogFile Parameter (Connect-FTP Cmdlet)

The location of a file to which debug information is written.

Syntax

Connect-FTP -LogFile string

Remarks

Default Value

""

Overwrite Parameter (Connect-FTP Cmdlet)

Indicates whether the LocalFile may be overwritten.

Syntax

Connect-FTP -Overwrite SwitchParameter

Remarks

Default Value

false

Password Parameter (Connect-FTP Cmdlet)

The password to use for authentication.

Syntax

Connect-FTP -Password string

Remarks

Default Value

""

Port Parameter (Connect-FTP Cmdlet)

The TCP port in the remote host to which to connect.

Syntax

Connect-FTP -Port int

Remarks

Default Value

21

RemoteFile Parameter (Connect-FTP Cmdlet)

The name of the remote file to download.

Syntax

Connect-FTP -RemoteFile string

Remarks

Default Value

""

Parameter Position

1

Parameter Alias

Download

Server Parameter (Connect-FTP Cmdlet)

The address of the Server.

Syntax

Connect-FTP -Server string

Remarks

Default Value

""

Parameter Position

0

This is a required parameter.

SSL Parameter (Connect-FTP Cmdlet)

Determines how the component starts SSL negotiation.

Syntax

Connect-FTP -SSL string

Remarks

Default Value

3

SSLAccept Parameter (Connect-FTP Cmdlet)

The encoded public key of the certificate which is to be trusted explicitly.

Syntax

Connect-FTP -SSLAccept string

Remarks

Default Value

""

Parameter Alias

Accept

Timeout Parameter (Connect-FTP Cmdlet)

The maximum time allowed for the operation.

Syntax

Connect-FTP -Timeout int

Remarks

Default Value

10

User Parameter (Connect-FTP Cmdlet)

The username to use for authentication.

Syntax

Connect-FTP -User string

Remarks

Default Value

""

FTPConnection Output Object (Connect-FTP Cmdlet)

The connection object.

Syntax

Object FTPConnection {
   SwitchParameter ActiveMode;
   string[] AfterConnect;
   string AuthMode;
   string CertPassword;
   string CertStore;
   string CertStoreType;
   string CertSubject;
   string[] Config;
   PSCredential Credential;
   string FirewallHost;
   string FirewallPassword;
   int FirewallPort;
   string FirewallType;
   string FirewallUser;
   SwitchParameter Force;
   string LocalIP;
   string LogFile;
   string Password;
   int Port;
   string Server;
   string SSL;
   string SSLAccept;
   int Timeout;
   string User;
}

Remarks

This object holds the connection. It may be passed to the Connection parameter of related cmdlets.

Config Settings (Connect-FTP Cmdlet)

Get-FTP Config Settings

FTP Config Settings

DILinger:  
PortRange:  
UseEPSV:  
UseMLSD:  
UseMLST:  
UseModeZ:  

TCPClient Config Settings

ConnectionTimeout:  
FirewallAutoDetect:  
FirewallHost:  
FirewallPassword:  
FirewallPort:  
FirewallType:  
FirewallUser:  
KeepAliveInterval:  
KeepAliveTime:  
Linger:  
LingerTime:  
LocalHost:  
LocalPort:  
MaxLineLength:  
MaxTransferRate:  
ProxyExceptionsList:  
TCPKeepAlive:  
TcpNoDelay:  
UseIPv6:  

Socket Config Settings

AbsoluteTimeout:  
FirewallData:  
InBufferSize:  
OutBufferSize:  

Base Config Settings

BuildInfo:  
CodePage:  
LicenseInfo:  
MaskSensitive:  
UseInternalSecurityAPI: