NetCmdlets 2016
NetCmdlets 2016
Questions / Feedback?

Remove-FTP Cmdlet

Parameters   Output Objects   Configuration Settings  

The Remove-FTP cmdlet is used to delete files from FTP, SFTP, and FTPS servers.

Syntax

Remove-FTP [parameters]

Remarks

This cmdlet implements a standard FTP client, as specified in RFC 959 and RFC 1579. In addition, it also includes the added option of SSL security (RFC 2228) in both the protocol and data channels.

To use the cmdlet to delete a file, you must specify the Server, User, and Password. The file to delete is given by RemoteFile

To use FTPS (SSL-enabled FTP), set SSL to True.

The cmdlets support pipeline input for some of their parameters. Prebuilding an object and piping it to the cmdlet is very useful, but should be used with caution to prevent security conflicts. Steps have been taken to decrease the risk of a possibly accidental pipe to the cmdlet, for instance, the Credential parameter cannot be piped to the cmdlet and must be specified manually.


# delete a directory
remove-ftp -server ftp_server -cred $cred -remotefile tmp/
# delete files based on a mask
remove-ftp -server ftp_server -cred $cred -remotefile tmp/*.txt

Connection Handling

This cmdlet supports persistent connections through the Connection parameter. To establish a new FTP connection, use the Connect-FTP cmdlet. To close the connection, use the Disconnect-FTP 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.
ActiveModeControls whether to direct the server into active mode.
AfterConnectA set of FTP commands to be executed immediately after connecting to the Server .
AfterDeleteA set of FTP commands to be executed immediately after each file deleted.
AuthModeThe type of authentication used by the cmdlet.
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 cmdlet 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.
RemoteFileThe the remote file to delete.
ServerThe address of the Server.
SSLDetermines how the cmdlet 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.

FTPDeletedFileThis object is created after a file has been deleted.

Configuration Settings


The following is a list of configuration 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.
ActiveModePORTAddressAllows the specification of the PORT address value for active mode connections.
ActiveModeIPAllows the specification of the IP address that the server will connect to for active mode connections.
AppendToLocalFileAppend downloaded files to a local file.
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.
IgnoreEntriesDirectory entry data to ignore.
FileTimeFormatThe format of file time reported by the server.
MaskSensitiveMasks passwords in logs.
PortRangeAllows the specification of a port range where the cmdlet listens for active mode connections.
PreserveFileTimeAttempts to preserve timestamps when transferring files.
RealTimeUploadEnables real time uploading.
RealTimeUploadAgeLimitThe age limit in seconds when using RealTimeUpload.
ReuseSSLSessionInDIWhether the SSL session will be reused for the DI connection.
ReusePISSLSessionInDIWhether the PI SSL session will be reused for the DI connection.
UseEPSVAllows extended passive mode.
UseMLSDUses listings for machine processing.
UseMLSTUses single file listing for machine processing.
UseModeZAllows compression to be used when transferring data.
ModeZCompressionLevelUsed to specify the level of compression used.
UseRemoteHostAddressForPassiveInstructs the cmdlet to use the address specified by RemoteHost when establishing a data connection.
UseClearChannelAllows for the Clear Command Channel (CCC) command.
UseClearDataChannelAllows for the PROT C command.
UseOldAUTHSSLAllows use of the 'AUTH SSL' command instead of 'AUTH TLS'.
UseProtWhenImplicitSends the PROT P command to the server.
VirtualHostNameSends the HOST command to the server.
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.
KeepAliveTimeThe inactivity time in milliseconds before a TCP keep-alive packet is sent.
KeepAliveIntervalThe retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.
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.
UseIPv6Whether to use IPv6.
TcpNoDelayWhether or not to delay when sending packets.
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.
UseBackgroundThreadWhether threads created by the cmdlet are background threads.
UseInternalSecurityAPITells the cmdlet whether or not to use the system security libraries or an internal implementation.

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