Send-FTP Cmdlet
Parameters Output Objects Config Settings
The Send-FTP component can be used to upload files to FTP, SFTP, and FTPS servers.
Syntax
Send-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 upload a file, you must specify the Server, User, and Password. The path and filename to upload from is given by LocalFile, and the file to save on the Server is specified by RemoteFile.
To use FTPS (SSL-enabled FTP), set the SSL parameter.
This cmdlet only handles uploading files. To download files or retrieve directory listings, please see the GET-FTP cmdlet.
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.
# Upload a file
send-ftp -server myserver -credential $cred -localfile C:\test.txt -remotefile test.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.
Connection | An already established connection. |
LogFile | The location of a file to which debug information is written. |
ActiveMode | Controls whether to direct the server into active mode. |
AfterConnect | A set of FTP commands to be executed immediately after connecting to the Server . |
AfterUpload | A set of FTP commands to be executed immediately after each file is uploaded. |
AuthMode | The type of authentication used by the component. |
BeforeUpload | A set of FTP commands to be executed immediately before each file is uploaded. |
Binary | Forces binary transfer mode for FTP and FTPS connections. |
CertPassword | The password to the certificate store. |
CertStore | The name of the certificate store for the client certificate. |
CertStoreType | The type of certificate store for the client certificate. |
CertSubject | The subject of the certificate used for client authentication. |
Command | Send the command to the remote host. |
Config | Specifies one or more configuration settings. |
Credential | The PSCredential object to use for user/password authentication. |
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. |
Force | Forces the component to accept the default behavior instead of querying the user. |
LocalFile | The local file to upload. |
LocalIP | The IP address of the local interface to use. |
LogFile | The location of a file to which debug information is written. |
MakeDirectory | The folder to create. |
Overwrite | Indicates whether or not the file should be overwritten. |
Password | The password to use for authentication. |
Port | The TCP port in the remote host to which to connect. |
RemoteFile | The remote file to save to. |
Server | The address of the Server. |
SSL | Determines how the component starts SSL negotiation. |
SSLAccept | The encoded public key of the certificate which is to be trusted explicitly. |
Timeout | The maximum time allowed for the operation. |
User | The 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.
FTPCommand | This object is created when a command is sent to the server. |
FTPFile | This object is created after a file has finished transferring. |
Config Settings
The following is a list of config settings for the cmdlet with short descriptions. Click on the links for further details.
UseFSwitch | Specifies whether or not the -F parameter is used when listing directory contents. |
UseSimpleDirList | Instructs the adapter to issue the NLST command instead of LIST. |
ActiveModeIP | Allows the specification of the IP address that the server will connect to for active mode connections. |
ActiveModePORTAddress | Allows the specification of the PORT address value for active mode connections. |
AppendToLocalFile | Append downloaded files to a local file. |
ApplyFileMaskLocally | Whether to filter the directory listing locally or on the server. |
AutoSelectDataIP | Automatically select the data connection IP. |
CalculatePercentDone | Enables or Disables calculating the percent complete for downloads. |
CheckTotalEntry | Whether to ignore directory listing total lines. |
DILinger | When set to True, DI connections are terminated gracefully. |
DILingerTime | Time in seconds to have the DI connection linger. |
FileTimeFormat | The format of file time reported by the server. |
IgnoreEntries | Directory entry data to ignore. |
MaskSensitive | Masks passwords in logs. |
ModeZCompressionLevel | Used to specify the level of compression used. |
PortRange | Allows the specification of a port range where the component listens for active mode connections. |
PreserveFileTime | Attempts to preserve timestamps when transferring files. |
RealTimeUpload | Enables real time uploading. |
RealTimeUploadAgeLimit | The age limit in seconds when using RealTimeUpload. |
ReusePISSLSessionInDI | Whether the PI SSL session will be reused for the DI connection. |
ReuseSSLSessionInDI | Whether the SSL session will be reused for the DI connection. |
UseClearChannel | Allows for the Clear Command Channel (CCC) command. |
UseClearDataChannel | Allows for the PROT C command. |
UseEPSV | Allows extended passive mode. |
UseMLSD | Uses listings for machine processing. |
UseMLST | Uses single file listing for machine processing. |
UseModeZ | Allows compression to be used when transferring data. |
UseOldAUTHSSL | Allows use of the 'AUTH SSL' command instead of 'AUTH TLS'. |
UseProtWhenImplicit | Sends the PROT P command to the server. |
UseRemoteHostAddressForPassive | Instructs the component to use the address specified by RemoteHost when establishing a data connection. |
VirtualHostName | Sends the HOST command to the server. |
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 (Send-FTP Cmdlet)
The location of a file to which debug information is written.
Syntax
Send-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
Connection Parameter (Send-FTP Cmdlet)
An existing FTP connection.
Syntax
Send-FTP -Connection FTPConnection
Remarks
Represents an existing, persistent FTP connection to be used. After this cmdlet executes, the connection will remain opened to be used in an another call. New connections can be established using the Connect-FTP cmdlet and closed using the Disconnect-FTP cmdlet.Default Value
null
ActiveMode Property (Send-FTP Cmdlet)
Controls whether to direct the server into active mode.
Syntax
Send-FTP -ActiveMode SwitchParameter
Remarks
Not recommended if behind a firewall.
Default Value
false
AfterConnect Property (Send-FTP Cmdlet)
A set of FTP commands to be executed immediately after connecting to the Server .
Syntax
Send-FTP -AfterConnect string[]
Remarks
AfterConnect is a script that is executed immediately following a successful connection.
The script may contain any number of standard FTP commands.
Each line in the script is treated as a single command. By default, if the cmdlet encounters any errors while executing a command, it will log the error message and will continue to process the script. This behavior can be turned off by inserting "ONERROR FAIL" at any point in the script, which will cause the script to terminate on error but will not interrupt the normal operation of the cmdlet. The default behavior can be restored at any point in the script by inserting the line "ONERROR RESUME".
Valid additional scripting commands are listed below:
cd Path | Change the remote directory to the specified path. |
del Filename | Delete the specified file from the remote server. |
mkdir Directory | Create the specified remote directory on the server. |
rn Filename NewFilename | Rename the remote file specified by Filename to the NewFilename. |
move Filename NewFilename | Move the remote file located at Filename to the NewFilename. |
rm Filename | Remove the specified file from the remote server. |
rmdir Directory | Remove the remote directory from the server. |
Supported Macros
The cmdlet also support the following Macros. These values are not case sensitive and would be supplied to a property in the form %MacroName%.
Temp | This is resolved to the full path to the system's temporary directory. |
SourceFileName | The original file name. This includes the extension and excludes the file path, for example, Sample.xml. This macro is only applicable to AfterDownload, AfterUpload, and AfterDelete. |
DateTime:CustomFormat | This special value allows you to specify your own custom time format. For instance DateTime:yyyy would be resolved to the 4 digit year. |
Date | The date format yyyy-MM-dd. |
DateTime | The date format yyyy-MM-ddThhmmss. |
Time | The date format hhmmss. |
DateTime_BTS2000 | The date format yyyyMMddhhmmssf. |
DateTime.TZ | The date format yyyy-MM-ddThhmmsszzz. |
Time.TZ | The date format hhmmsszzz. |
Default Value
null
AfterUpload Property (Send-FTP Cmdlet)
A set of FTP commands to be executed immediately after each file is uploaded.
Syntax
Send-FTP -AfterUpload string[]
Remarks
AfterUpload is a script that is executed immediately after uploading a file.
The script may contain any number of standard FTP commands.
Each line in the script is treated as a single command. By default, if the cmdlet encounters any errors while executing a command, it will log the error message and will continue to process the script. This behavior can be turned off by inserting "ONERROR FAIL" at any point in the script, which will cause the script to terminate on error but will not interrupt the normal operation of the cmdlet. The default behavior can be restored at any point in the script by inserting the line "ONERROR RESUME".
Valid additional scripting commands are listed below:
cd Path | Change the remote directory to the specified path. |
del Filename | Delete the specified file from the remote server. |
mkdir Directory | Create the specified remote directory on the server. |
rn Filename NewFilename | Rename the remote file specified by Filename to the NewFilename. |
move Filename NewFilename | Move the remote file located at Filename to the NewFilename. |
rm Filename | Remove the specified file from the remote server. |
rmdir Directory | Remove the remote directory from the server. |
Supported Macros
The cmdlet also support the following Macros. These values are not case sensitive and would be supplied to a property in the form %MacroName%.
Temp | This is resolved to the full path to the system's temporary directory. |
SourceFileName | The original file name. This includes the extension and excludes the file path, for example, Sample.xml. This macro is only applicable to AfterDownload, AfterUpload, and AfterDelete. |
DateTime:CustomFormat | This special value allows you to specify your own custom time format. For instance DateTime:yyyy would be resolved to the 4 digit year. |
Date | The date format yyyy-MM-dd. |
DateTime | The date format yyyy-MM-ddThhmmss. |
Time | The date format hhmmss. |
DateTime_BTS2000 | The date format yyyyMMddhhmmssf. |
DateTime.TZ | The date format yyyy-MM-ddThhmmsszzz. |
Time.TZ | The date format hhmmsszzz. |
Default Value
null
AuthMode Property (Send-FTP Cmdlet)
The type of authentication used by the component.
Syntax
Send-FTP -AuthMode string
Remarks
Normally, the cmdlet will attempt to log in to the SSH server and authenticate via username and password. This behavior can be changed to use client key (RSA) authentication by setting this parameter to 'PublicKey'.
Password (default) | Password authentication used with the SSH server. |
PublicKey | When Public Key authentication is used, the cmdlet will search the certificate store specified in CertStore for a private key associated with CertSubject when logging onto the SSH server. This private key is used to verify the client's identity during the user authentication phase of the SSH logon process. |
KeyboardInteractive | When KeyboardInteractive authentication is used, the cmdlet will wait for the server to prompt for the password using PasswordPrompt and supply the value of the Password property. This should not be confused with Password authentication. |
GSSAPIWithMic | This allows the cmdlet to attempt Kerberos authentication using the GSSAPI-WITH-MIC scheme. The client will try Kerberos authentication using the value of User (single sign-on), or if Password is specified as well, it will try Kerberos authentication with alternate credentials. |
MultiFactor | This allows the cmdlet to attempt a multi-step authentication process. The cmdlet will send authentication data to the server based on the list of methods allowed for the current user and the authentication property values supplied. |
Default Value
2
BeforeUpload Property (Send-FTP Cmdlet)
A set of FTP commands to be executed immediately before each file is uploaded.
Syntax
Send-FTP -BeforeUpload string[]
Remarks
BeforeUpload is a script that is executed immediately before uploading a file.
The script may contain any number of standard FTP commands.
Each line in the script is treated as a single command. By default, if the cmdlet encounters any errors while executing a command, it will log the error message and will continue to process the script. This behavior can be turned off by inserting "ONERROR FAIL" at any point in the script, which will cause the script to terminate on error but will not interrupt the normal operation of the cmdlet. The default behavior can be restored at any point in the script by inserting the line "ONERROR RESUME".
Valid additional scripting commands are listed below:
cd Path | Change the remote directory to the specified path. |
del Filename | Delete the specified file from the remote server. |
mkdir Directory | Create the specified remote directory on the server. |
rn Filename NewFilename | Rename the remote file specified by Filename to the NewFilename. |
move Filename NewFilename | Move the remote file located at Filename to the NewFilename. |
rm Filename | Remove the specified file from the remote server. |
rmdir Directory | Remove the remote directory from the server. |
Supported Macros
The cmdlet also support the following Macros. These values are not case sensitive and would be supplied to a property in the form %MacroName%.
Temp | This is resolved to the full path to the system's temporary directory. |
SourceFileName | The original file name. This includes the extension and excludes the file path, for example, Sample.xml. This macro is only applicable to AfterDownload, AfterUpload, and AfterDelete. |
DateTime:CustomFormat | This special value allows you to specify your own custom time format. For instance DateTime:yyyy would be resolved to the 4 digit year. |
Date | The date format yyyy-MM-dd. |
DateTime | The date format yyyy-MM-ddThhmmss. |
Time | The date format hhmmss. |
DateTime_BTS2000 | The date format yyyyMMddhhmmssf. |
DateTime.TZ | The date format yyyy-MM-ddThhmmsszzz. |
Time.TZ | The date format hhmmsszzz. |
Default Value
null
Binary Property (Send-FTP Cmdlet)
Forces binary transfer mode for FTP and FTPS connections.
Syntax
Send-FTP -Binary SwitchParameter
Remarks
Forces binary transfer mode for FTP and FTPS connections.
Default Value
false
Parameter Alias
TransferMode
CertPassword Property (Send-FTP Cmdlet)
The password to the certificate store.
Syntax
Send-FTP -CertPassword string
Remarks
Specifies a password (if required) to access the specified certificate store.
Default Value
""
Parameter Alias
CertificatePassword
CertStore Property (Send-FTP Cmdlet)
The name of the certificate store for the client certificate.
Syntax
Send-FTP -CertStore string
Remarks
The CertStoreType parameter specifies the type of the certificate store specified by CertStore. If the store is password protected, specify the password in CertPassword.
CertStore is used in conjunction with the CertSubject parameter in order to specify client certificates. If CertStore has a value, and CertSubject has been set, a search for a certificate is initiated during logon. Please refer to the CertSubject parameter for details.
Designations of certificate stores are platform-dependent.
The following are designations of the most common User and Machine certificate stores in Windows:
MY | A certificate store holding personal certificates with their associated private keys. |
CA | Certifying authority certificates. |
ROOT | Root certificates. |
SPC | Software publisher certificates. |
When the certificate store type is PFXFile, this parameter must be set to the name of the file.
Default Value
"MY"
Parameter Alias
CertificateStore
CertStoreType Property (Send-FTP Cmdlet)
The type of certificate store for the client certificate.
Syntax
Send-FTP -CertStoreType string
Remarks
This parameter can take one of the following values:
User (default) | This specifies that the certificate store is owned by the current user (these are the user's registry certificate stores such as MY, CA, etc.). |
Machine | The certificate store is a machine store. |
PFXFile | The certificate store is the name of a PFX (PKCS12) file containing certificates. |
PFXBlob | The certificate store is a string (base64 encoded) representing a certificate store in PFX (PKCS12) format. You should use this option if storing a pfx file's content in a shell variable. |
PEMKeyFile | The certificate store is the name of a file that contains a PEM encoded certificate and private key. |
PEMKeyBlob | The certificate store is a string that contains a PEM encoded certificate and private key. |
P7BFile | The certificate store is the name of a file that contains P7B encoded certificates. |
SSHPublicKeyFile | The certificate store is the name of a file that contains an SSH-style public key. |
PPKFile | The certificate store is the name of a file that contains a PPK (PuTTY Private Key). |
PPKBlob | The certificate store is a string (binary) that contains a PPK (PuTTY Private Key). |
Default Value
0
CertSubject Property (Send-FTP Cmdlet)
The subject of the certificate used for client authentication.
Syntax
Send-FTP -CertSubject string
Remarks
During the user authentication phase of the logon process, the cmdlet will search the store specified in CertStore for a certificate that matches this parameter. If the store contains a private key for that certificate, it is used to verify the user's identity with the secure server.
When this parameter is set, a search is performed in the current certificate store certificate with matching subject.
If an exact match is not found, the store is searched for subjects containing the value of the parameter.
When setting the parameter to a partial subject, CN= should be omitted. For example, the following code would find the certificate with subject CN=Test Certificate, OU=People, C=US
Example (Searching with partial subject)
-certsubject "Test"
If a match is not found, the parameter is set to an empty string, and no certificate is selected.
The special value "*" picks a random certificate in the certificate store.
Default Value
"*"
Command Property (Send-FTP Cmdlet)
Send the command to the remote host.
Syntax
Send-FTP -Command string[]
Remarks
The response of the server is returned through a FTPCommand object.
Default Value
null
Config Property (Send-FTP Cmdlet)
Specifies one or more configuration settings.
Syntax
Send-FTP -Config string[]
Remarks
The Config parameter takes one or more name-value pairs that represent the name of the configuration setting and value, i.e.: -config "Name=Value"
Default Value
null
Credential Property (Send-FTP Cmdlet)
The PSCredential object to use for user/password authentication.
Syntax
Send-FTP -Credential PSCredential
Remarks
Every cmdlet that supports user authentication will expose a Credential parameter. A PSCredential object should be specified for this parameter. Alternatively, the User and Password parameters can be set to represent the credential information.
If the cmdlet supports client key authentication it uses the password field of this object for the certificate's password. This setting is enabled by using public key authentication. Note: Due to security reasons, it is recommended that you use the Credential parameter rather than User and Password to specify the authentication information.
Default Value
null
Parameter Position
1
Parameter Alias
auth
FirewallHost Property (Send-FTP Cmdlet)
Name or IP address of firewall.
Syntax
Send-FTP -FirewallHost string
Remarks
If a FirewallHost is given, requested connections will be authenticated through the specified firewall when connecting.
If the FirewallHost parameter is set to a Domain Name, a DNS request is initiated. Upon successful termination of the request, the FirewallHost parameter is set to the corresponding address. If the search is not successful, an error is returned.
Default Value
""
FirewallPassword Property (Send-FTP Cmdlet)
A password if authentication is to be used when connecting through the firewall.
Syntax
Send-FTP -FirewallPassword string
Remarks
If FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to authenticate against the firewall.
Default Value
""
FirewallPort Property (Send-FTP Cmdlet)
The port of the firewall to which to connect.
Syntax
Send-FTP -FirewallPort int
Remarks
The TCP port for the FirewallHost. See the description of the FirewallHost parameter for details.
Note that the FirewallPort is set automatically when FirewallType is set to a valid value. See the description of the FirewallType parameter for details. Setting this parameter will overwrite the default settings for the firewall port as specified by FirewallType.
Default Value
0
FirewallType Property (Send-FTP Cmdlet)
Determines the type of firewall to connect through.
Syntax
Send-FTP -FirewallType string
Remarks
The applicable values are the following:
None | No firewall (default setting). |
Tunnel | Connect through a tunneling proxy. FirewallPort is set to 80. |
SOCKS4 | Connect through a SOCKS4 Proxy. FirewallPort is set to 1080. |
SOCKS5 | Connect through a SOCKS5 Proxy. FirewallPort is set to 1080. |
Default Value
0
FirewallUser Property (Send-FTP Cmdlet)
A user name if authentication is to be used connecting through a firewall.
Syntax
Send-FTP -FirewallUser string
Remarks
If FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to authenticate against the firewall.
Default Value
""
Force Property (Send-FTP Cmdlet)
Forces the component to accept the default behavior instead of querying the user.
Syntax
Send-FTP -Force SwitchParameter
Remarks
The Force parameter is especially useful in a script environment where user interaction is not an option. Certain cmdlets that are SSH and SSL based will query the user if the security credentials of the certificate presented by the server are not met. Setting this parameter will force the cmdlet to accept the certificate of the server unconditionally.
Default Value
false
LocalFile Property (Send-FTP Cmdlet)
The local file to upload.
Syntax
Send-FTP -LocalFile string
Remarks
LocalFile contains the path of the filename on your machine that is to be uploaded to the Server. RemoteFile specifies the path and filename that LocalFile will be saved to on the Server.
Default Value
""
Parameter Position
1
Parameter Alias
Upload
LocalIP Property (Send-FTP Cmdlet)
The IP address of the local interface to use.
Syntax
Send-FTP -LocalIP string
Remarks
This parameter is useful when the cmdlet is running on a machine that has more than one network interface (each with its own IP address and network access privileges).
Default Value
""
Parameter Alias
LocalAddress
LogFile Property (Send-FTP Cmdlet)
The location of a file to which debug information is written.
Syntax
Send-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
""
MakeDirectory Property (Send-FTP Cmdlet)
The folder to create.
Syntax
Send-FTP -MakeDirectory string
Remarks
When MakeDirectory is set, the cmdlet will attempt to create the directory on the server. MakeDirectory may be set to a relative path based on the server's home directory or an absolute path;
Default Value
""
Parameter Alias
mkdir
Overwrite Property (Send-FTP Cmdlet)
Indicates whether or not the file should be overwritten.
Syntax
Send-FTP -Overwrite SwitchParameter
Remarks
By default, if the file exists it is not overwritten and a error is returned indicating that the file exists on the remote server. If the file should be overwritten please set the Overwrite flag.
Default Value
false
Password Property (Send-FTP Cmdlet)
The password to use for authentication.
Syntax
Send-FTP -Password string
Remarks
Every time User, or Password are set, the cmdlet will authenticate with the server. It is recommended that the Credential parameter is set instead of User/Password because of security reasons. If both Credential and this parameter is set, the Credential value is used.
Default Value
""
Port Property (Send-FTP Cmdlet)
The TCP port in the remote host to which to connect.
Syntax
Send-FTP -Port int
Remarks
Port specifies a service port on the remote host to which to connect.
A valid port number (a value between 1 and 65535) is required for the connection to take place.
If the SSL parameter is set to "implicit", the default port will switch to 990.
Default Value
21
RemoteFile Property (Send-FTP Cmdlet)
The remote file to save to.
Syntax
Send-FTP -RemoteFile string
Remarks
RemoteFile is the name of the file on the server to which the LocalFile will be saved. It is either an absolute file path, or a relative path based on the servers current path.
To use the existing filename specified by LocalFile, set RemoteFile to an absolute or relative path ending with a "/". For instance:
send-ftp -server TestServer -user test -password test -remotefile MyFolder/MySubFolder/ -localfile c:\MyFile.txt
The above code will upload a file called "MyFile.txt" to "MyFolder/MySubFolder" on the server.
Default Value
""
Server Property (Send-FTP Cmdlet)
The address of the Server.
Syntax
Send-FTP -Server string
Remarks
The cmdlet requires a server address to be provided. Either an IP address or the server host name can be provided.
Default Value
""
Parameter Position
0
This is a required parameter.
SSL Property (Send-FTP Cmdlet)
Determines how the component starts SSL negotiation.
Syntax
Send-FTP -SSL string
Remarks
SSL may have one of the following values:
none (default) | No SSL negotiation, no SSL security. All communication will be in plaintext mode. |
automatic | If the Port is set to the standard plaintext port of the protocol (where applicable), the cmdlet will behave the same as if SSL is set to explicit. In all other cases, SSL negotiation will be implicit. |
implicit | The SSL negotiation will start immediately after the connection is established. |
explicit | The cmdlet will first connect in plaintext, and then explicitly start SSL negotiation through a protocol command such as STARTTLS. |
Default Value
3
SSLAccept Property (Send-FTP Cmdlet)
The encoded public key of the certificate which is to be trusted explicitly.
Syntax
Send-FTP -SSLAccept string
Remarks
Ordinarily, the certificate presented by the server will be checked against the system certificate stores to see if the Certificate Authority is trusted, and if not, the cmdlet will prompt the user to accept the certificate. Setting this parameter will override the system settings and trust the certificate provided.
After each connection, regardless of whether or not the certificate was trusted, the cmdlet will store the certificate presented by the server in the $SSLServerCertificate session variable. This variable can be inspected to view details of the server's certificate.
If the Force parameter is set, the cmdlet will accept the server's certificate unconditionally.
In cases where the certificate presented by the server is not trusted, a prompt will be shown to the user. This prompt will allow the user to decide whether or not they would like to accept the certificate presented by the server.
There may be cases where you do not want a prompt to be displayed or would like to handle the response supplied directly within your script. This can be done by setting the $SSLAcceptPreference variable prior to running the cmdlet. The available values for this variable are:
None (default) | Maintains the default behavior. If the certificate is not trusted by default, the user will be prompted. |
Accept | Accepts the certificate without prompting the user, even if it is not trusted by default. |
Reject | Rejects the certificate without prompting the user only if it is not trusted by default. Thus if the certificate is found to be trusted or the Force parameter is set, the connection will still be accepted. |
Default Value
""
Parameter Alias
Accept
Timeout Property (Send-FTP Cmdlet)
The maximum time allowed for the operation.
Syntax
Send-FTP -Timeout int
Remarks
After the specified interval in seconds, the cmdlet will throw a Timeout error if the operation is not completed.
Default Value
10
User Property (Send-FTP Cmdlet)
The username to use for authentication.
Syntax
Send-FTP -User string
Remarks
Every time User and Password are set, the cmdlet will authenticate with the server. It is recommended that the Credential parameter is set instead of User/Password because of security reasons. If both Credential and this parameter is set, the Credential value is used.
Default Value
""
FTPCommand Output Object (Send-FTP Cmdlet)
This object is created when a command is sent to the server.
Syntax
Object FTPCommand {string Command;
string Reply;
string RawResponse;
}
Remarks
When the Command is set, the cmdlet will send the unparsed command to the server and wait for the reply. When the reply is received from the server a FTPCommand object is returned where Reply holds the server's reply code and description.
FTPFile Output Object (Send-FTP Cmdlet)
This object is created after a file has finished transferring.
Syntax
Object FTPFile {string Name;
int Time;
long Size;
int TransferRate;
}
Remarks
Once a file has finished being transferred, the FTPFile object is created with the Name of the file and the Time it took to transfer. TransferRate indicates the transfer rate in KBytes/s, this is calculated by dividing Size by the Time that it took.
Config Settings (Send-FTP Cmdlet)
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 Config 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 Config Settings
ActiveModeIP:
Allows the specification of the IP address that the server will connect to for active mode connections.The ActiveModeIP configuration setting can be used to specify the IP address that the server will connect to when
using an active mode configuration (Passive = False). When this configuration setting is set, the port number where the component
listens for active mode connections will still be managed by the component. The PortRange also can
be used to ensure that the correct port is used by the client.
Note: This configuration setting will be ignored if ActiveModePORTAddress is also specified. |
|
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 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 configuration setting must be used in conjunction with PortRange to ensure that the correct port is used by the client. |
|
AppendToLocalFile: Append downloaded files to a local file.If set to True, the downloaded files will be appended to the file specified in LocalFile. | |
ApplyFileMaskLocally: Whether to filter the directory listing locally or on the server.If set to true any filemask provided to RemoteFile will be applied locally, after the server has returned the results. When set to false (default), the value in RemoteFile will be sent to the server as part of the relevant listing command. Because using filemasks with list commands is not standardized, some servers do not support them and will return an error. | |
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 Secure Sockets Layer/Transport Layer Security (SSL/TLS) is used any network address translation (NAT) done by the firewall cannot occur. 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 is 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 (default), 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 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), follow two scenarios to determine how long the connection will linger. In the first scenario, if DILingerTime is 0 (default), the system will attempt to send pending data for a connection until the default IP 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 are 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 let the socket connection linger. This value is 0 by default, which means it will use the default IP timeout. | |
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 when calling the QueryFileTime method.
To disable all formatting, set this to empty string.
Note: This setting applies only when calling QueryFileTime. It does not apply to the FileTime parameter of the DirList event. |
|
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. | |
MaskSensitive: Masks passwords in logs.The default value is False. When set to True, the cmdlet will mask passwords that otherwise would appear in its logs. | |
ModeZCompressionLevel: Used to specify the level of compression used.The default value is 7. Valid values range from 0 to 9. A higher value indicates that a higher compression level is being used. This is valid only when UseModeZ is set to True. | |
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 and is 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 are found in LocalFile the upload will complete. The default value is "1". | |
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. | |
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 Secure Sockets Layer (SSL) session. When set to False, a new SSL session will always be created for the DI connection. | |
UseClearChannel: Allows for the Clear Command Channel (CCC) command.When this is 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. | |
UseEPSV: Allows extended passive mode.When this is set, the 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 that 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 valid only 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 will be returned. This command is an extension
to the protocol, which defines a more standardized and reliable directory listing format, but does so only for a single file or folder.
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 that all data transferred are first compressed either by the server (when downloading) or by the cmdlet (when uploading). Note: Not all servers support this feature. | |
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 that support only the AUTH SSL
command.
Note: Using AUTH SSL instead of AUTH TLS is strongly discouraged because of 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. | |
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 applicable only when AutoSelectDataIP is set to False.
When this setting is 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). |
|
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 configuration setting is set, the HOST command is sent to the server before authenticating. |
TCPClient Config 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 configuration 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 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 setting is provided for use by cmdlets that do not directly expose Firewall properties. |
|||||||||||
FirewallPort:
The TCP port for the FirewallHost;.The FirewallPort is set automatically when FirewallType is set to a valid value.
Note: This configuration 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:
Note: 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 setting is provided for use by cmdlets that do not directly expose Firewall properties. |
|||||||||||
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 acknowledgment is received from the remote host, the keep-alive packet
will be sent again. This configuration 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 macOS. |
|||||||||||
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 Transmission Control Protocol (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. | |||||||||||
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), two scenarios determine how long the connection will linger. In the first, if LingerTime is 0 (default), the system will attempt to send pending data for a connection until the default IP timeout expires. In the second scenario, if 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 are 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 (e.g., by a client acknowledgment), 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, the socket connection will linger. This value is 0 by default, which means it will use the default IP 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. |
|||||||||||
MaxTransferRate: The transfer rate limit in bytes per second.This configuration 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 configuration 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. |
|||||||||||
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. |
|||||||||||
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:
|
Socket Config 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 Config Settings
BuildInfo: Information about the product's build.When queried, this setting will return a string containing information about the product's build. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CodePage:
The system code page used for Unicode to Multibyte translations.The default code page is Unicode UTF-8 (65001).
The following is a list of valid code page identifiers:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LicenseInfo:
Information about the current license.When queried, this setting will return a string containing information about the license this instance of a cmdlet is using. It will return the following information:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MaskSensitive:
Whether sensitive data is masked in log messages.In certain circumstances it may be beneficial to mask sensitive data, like passwords, in log messages. Set this to true to mask sensitive data. The default is false.
This setting only works on these cmdlets: AS3Receiver, AS3Sender, Atom, Client(3DS), FTP, FTPServer, IMAP, OFTPClient, SSHClient, SCP, Server(3DS), Sexec, SFTP, SFTPServer, SSHServer, TCPClient, TCPServer. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
UseInternalSecurityAPI:
Tells the cmdlet whether or not to use the system security libraries or an internal implementation.
When set to false, the cmdlet will use the system security libraries by default to perform cryptographic functions where applicable.
In this case, 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 setting to true tells the cmdlet to use the internal implementation instead of using the system security libraries. On Windows, this setting is set to false by default. On Linux/macOS, this setting is set to true by default. If using the .NET Standard Library, this setting will be true on all platforms. The .NET Standard library does not support using the system security libraries. 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. |