Get-SFTP Cmdlet

Parameters   Output Objects   Config Settings  

The Get-SFTP component is used to download files and retrieve directory listings from SFTP servers.

Syntax

Get-SFTP [parameters]

Remarks

This cmdlet implements a standard SFTP client to transfer files from an SSH server's SFTP subsystem.

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

Directory listings may be retrieved by setting List to the remote path of which you wish to receive a directory listing. Results of a directory listing will be returned in one or more EntryInfo objects.

This cmdlet handles listing directories and downloading files. To upload files please see the SEND-SFTP 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.

# Download a file from an SFTP server get-sftp -server ftp_server -cred $cred -remotefile text.txt -localfile "C:\text.txt" # Connect using SSH with public key authentication and download all .txt files $certPass = Read-Host "Enter Cert Password" -AsSecureString get-sftp -user test -server SFTPServer -AuthMode PublicKey -CertStoreType PEMKey -CertStore file.pem -CertPassword $certPass -CertSubject * -Path Folder1 -RemoteFile *.txt

Connection Handling

This cmdlet supports persistent connections through the Connection parameter. To establish a new SFTP connection, use the Connect-SFTP cmdlet. To close the connection, use the Disconnect-SFTP 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.
AfterConnectA set of FTP commands to be executed immediately after connecting to the Server .
AfterDownloadA set of FTP commands to be executed immediately after each file downloaded.
AuthModeThe type of authentication used by the component.
BeforeDownloadA set of FTP commands to be executed immediately before each file is downloaded.
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.
CompressionAlgorithmsA comma-separated list containing all allowable compression algorithms.
ConfigSpecifies one or more configuration settings.
CredentialThe PSCredential object to use for user/password authentication.
EncryptionAlgorithmsA comma-separated list containing all allowable compression algorithms.
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.
ListGet a directory listing for the path and file mask specified.
LocalFileThe local file to download to.
LocalIPThe IP address of the local interface to use.
LogFileThe location of a file to which debug information is written.
OverwriteIndicates whether the LocalFile may be overwritten.
PasswordThe password to use for authentication.
PasswordPromptThe shell prompt used for keyboard-interactive authentication.
PortThe TCP port in the remote host to which to connect.
RemoteFileThe name of the remote file to download.
ServerThe address of the Server.
SSHAcceptThe hex-encoded fingerprint of the host to trust 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.

EntryInfoThis object contains details about a file returned from the FTP Server .
FTPFileThis 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.

AllowBackslashInNameWhether backslashes are allowed in folder and file names.
AsyncTransferControls whether simultatenous requests are made to read or write files.
AttrAccessTimeCan be queried for the AccessTime file attribute during the DirList event.
AttrCreationTimeCan be queried for the CreationTime file attribute during the DirList event.
AttrFileTypeCan be queried for the FileType file attribute during the DirList event.
AttrGroupIdCan be queried for the GroupId file attribute during the DirList event.
AttrLinkCountCan be queried for the LinkCount file attribute during the DirList event.
AttrOwnerIdCan be queried for the OwnerId file attribute during the DirList event.
AttrPermissionCan be queried for the Permissions file attribute during the DirList event.
CheckFileHashCompares a server-computed hash with a hash calculated locally.
DisableRealPathControls whether or not the SSH_FXP_REALPATH request is sent.
ExcludeFileMaskSpecifies a file mask for excluding files in directory listings.
FileMaskDelimiterSpecifies a delimiter to use for setting multiple file masks in the RemoteFile property.
FiletimeFormatSpecifies the format to use when returning filetime strings.
FreeSpaceThe free space on the remote server in bytes.
GetSpaceInfoQueries the server for drive usage information.
GetSymlinkAttrsWhether to get the attributes of the symbolic link, or the resource pointed to by the link.
IgnoreFileMaskCasingControls whether or not the file mask is case sensitive.
LocalEOLWhen TransferMode is set, this specifies the line ending for the local system.
LogSFTPFileDataWhether SFTP file data is present in Debug logs.
MaskSensitiveMasks passwords in logs.
MaxFileDataSpecifies the maximum payload size of an SFTP packet.
MaxOutstandingPacketsSets the maximum number of simultaneous read or write requests allowed.
NegotiatedProtocolVersionThe negotiated SFTP version.
NormalizeRemotePathWhether to normalize the RemotePath.
PreserveFileTimePreserves the file's timestamps during transfer.
ProtocolVersionThe highest allowable SFTP version to use.
ReadLinkThis settings returns the target of a specified symbolic link.
RealTimeUploadEnables real time uploading.
RealTimeUploadAgeLimitThe age limit in seconds when using RealTimeUpload.
ServerEOLWhen TransferMode is set, this specifies the line ending for the remote system.
SimultaneousTransferLimitThe maximum number of simultaneous file transfers.
TotalSpaceThe total space on the remote server in bytes.
TransferModeThe transfer mode (ASCII or Binary).
TransferredDataLimitSpecifies the maximum number of bytes to download from the remote file.
UseFxpStatWhether SSH_FXP_STAT is sent.
UseServerFileTimeControls if the file time returned from the server is converted to local time or not.
UseServerFileTimeControls if the file time returned from the server is converted to local time or not.
ChannelDataEOL[ChannelId]Used to break the incoming data stream into chunks.
ChannelDataEOLFound[ChannelId]Determines if ChannelDataEOL was found.
ClientSSHVersionStringThe SSH version string used by the component.
EnablePageantAuthWhether to use a key stored in Pageant to perform client authentication.
KerberosDelegationIf true, asks for credentials with delegation enabled during authentication.
KerberosRealmThe fully qualified domain name of the Kerberos Realm to use for GSSAPI authentication.
KerberosSPNThe Kerberos Service Principal Name of the SSH host.
KeyRenegotiationThresholdSets the threshold for the SSH Key Renegotiation.
LogLevelSpecifies the level of detail that is logged.
MaxChannelDataLength[ChannelId]The maximum amount of data to accumulate when no ChannelDataEOL is found.
MaxPacketSizeThe maximum packet size of the channel, in bytes.
MaxWindowSizeThe maximum window size allowed for the channel, in bytes.
PasswordPromptThe text of the password prompt used in keyboard-interactive authentication.
PreferredDHGroupBitsThe size (in bits) of the preferred modulus (p) to request from the server.
RecordLengthThe length of received data records.
ServerSSHVersionStringThe remote host's SSH version string.
SignedSSHCertThe CA signed client public key used when authenticating.
SSHAcceptAnyServerHostKeyIf set the component will accept any key presented by the server.
SSHAcceptServerCAKeyThe CA public key that signed the server's host key.
SSHAcceptServerHostKeyFingerPrintThe fingerprint of the server key to accept.
SSHFingerprintHashAlgorithmThe algorithm used to calculate the fingerprint.
SSHFingerprintMD5The server hostkey's MD5 fingerprint.
SSHFingerprintSHA1The server hostkey's SHA1 fingerprint.
SSHFingerprintSHA256The server hostkey's SHA256 fingerprint.
SSHKeepAliveCountMaxThe maximum number of keep alive packets to send without a response.
SSHKeepAliveIntervalThe interval between keep alive packets.
SSHKeyExchangeAlgorithmsSpecifies the supported key exchange algorithms.
SSHKeyRenegotiateCauses the component to renegotiate the SSH keys.
SSHMacAlgorithmsSpecifies the supported Mac algorithms.
SSHPubKeyAuthSigAlgorithmsSpecifies the enabled signature algorithms that may be used when attempting public key authentication.
SSHPublicKeyAlgorithmsSpecifies the supported public key algorithms for the server's public key.
SSHVersionPatternThe pattern used to match the remote host's version string.
TryAllAvailableAuthMethodsIf set to true, the component will try all available authentication methods.
WaitForChannelCloseWhether to wait for channels to be closed before disconnected.
WaitForServerDisconnectWhether to wait for the server to close the connection.
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 (Get-SFTP Cmdlet)

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

Syntax

Get-SFTP -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 (Get-SFTP Cmdlet)

An existing SFTP connection.

Syntax

Get-SFTP -Connection SFTPConnection

Remarks

Represents an existing, persistent SFTP 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-SFTP cmdlet and closed using the Disconnect-SFTP cmdlet.

Default Value

null

AfterConnect Property (Get-SFTP Cmdlet)

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

Syntax

Get-SFTP -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 PathChange the remote directory to the specified path.
del FilenameDelete the specified file from the remote server.
mkdir DirectoryCreate the specified remote directory on the server.
rn Filename NewFilenameRename the remote file specified by Filename to the NewFilename.
move Filename NewFilenameMove the remote file located at Filename to the NewFilename.
rm FilenameRemove the specified file from the remote server.
rmdir DirectoryRemove 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%.

TempThis is resolved to the full path to the system's temporary directory.
SourceFileNameThe 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:CustomFormatThis special value allows you to specify your own custom time format. For instance DateTime:yyyy would be resolved to the 4 digit year.
DateThe date format yyyy-MM-dd.
DateTimeThe date format yyyy-MM-ddThhmmss.
TimeThe date format hhmmss.
DateTime_BTS2000The date format yyyyMMddhhmmssf.
DateTime.TZThe date format yyyy-MM-ddThhmmsszzz.
Time.TZThe date format hhmmsszzz.

Default Value

null

AfterDownload Property (Get-SFTP Cmdlet)

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

Syntax

Get-SFTP -AfterDownload string[]

Remarks

AfterDownload is a script that is executed immediately after downloading a file successfully.

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 PathChange the remote directory to the specified path.
del FilenameDelete the specified file from the remote server.
mkdir DirectoryCreate the specified remote directory on the server.
rn Filename NewFilenameRename the remote file specified by Filename to the NewFilename.
move Filename NewFilenameMove the remote file located at Filename to the NewFilename.
rm FilenameRemove the specified file from the remote server.
rmdir DirectoryRemove 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%.

TempThis is resolved to the full path to the system's temporary directory.
SourceFileNameThe 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:CustomFormatThis special value allows you to specify your own custom time format. For instance DateTime:yyyy would be resolved to the 4 digit year.
DateThe date format yyyy-MM-dd.
DateTimeThe date format yyyy-MM-ddThhmmss.
TimeThe date format hhmmss.
DateTime_BTS2000The date format yyyyMMddhhmmssf.
DateTime.TZThe date format yyyy-MM-ddThhmmsszzz.
Time.TZThe date format hhmmsszzz.

Default Value

null

AuthMode Property (Get-SFTP Cmdlet)

The type of authentication used by the component.

Syntax

Get-SFTP -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.
PublicKeyWhen 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.
KeyboardInteractiveWhen 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.
GSSAPIWithMicThis 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.
MultiFactorThis 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

BeforeDownload Property (Get-SFTP Cmdlet)

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

Syntax

Get-SFTP -BeforeDownload string[]

Remarks

BeforeDownload is a script that is executed immediately before downloading 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 PathChange the remote directory to the specified path.
del FilenameDelete the specified file from the remote server.
mkdir DirectoryCreate the specified remote directory on the server.
rn Filename NewFilenameRename the remote file specified by Filename to the NewFilename.
move Filename NewFilenameMove the remote file located at Filename to the NewFilename.
rm FilenameRemove the specified file from the remote server.
rmdir DirectoryRemove 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%.

TempThis is resolved to the full path to the system's temporary directory.
SourceFileNameThe 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:CustomFormatThis special value allows you to specify your own custom time format. For instance DateTime:yyyy would be resolved to the 4 digit year.
DateThe date format yyyy-MM-dd.
DateTimeThe date format yyyy-MM-ddThhmmss.
TimeThe date format hhmmss.
DateTime_BTS2000The date format yyyyMMddhhmmssf.
DateTime.TZThe date format yyyy-MM-ddThhmmsszzz.
Time.TZThe date format hhmmsszzz.

Default Value

null

CertPassword Property (Get-SFTP Cmdlet)

The password to the certificate store.

Syntax

Get-SFTP -CertPassword string

Remarks

Specifies a password (if required) to access the specified certificate store.

Default Value

""

Parameter Alias

CertificatePassword

CertStore Property (Get-SFTP Cmdlet)

The name of the certificate store for the client certificate.

Syntax

Get-SFTP -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:

MYA certificate store holding personal certificates with their associated private keys.
CACertifying authority certificates.
ROOTRoot certificates.
SPCSoftware 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 (Get-SFTP Cmdlet)

The type of certificate store for the client certificate.

Syntax

Get-SFTP -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.).
MachineThe certificate store is a machine store.
PFXFileThe certificate store is the name of a PFX (PKCS12) file containing certificates.
PFXBlobThe 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.
PEMKeyFileThe certificate store is the name of a file that contains a PEM encoded certificate and private key.
PEMKeyBlobThe certificate store is a string that contains a PEM encoded certificate and private key.
P7BFileThe certificate store is the name of a file that contains P7B encoded certificates.
SSHPublicKeyFileThe certificate store is the name of a file that contains an SSH-style public key.
PPKFileThe certificate store is the name of a file that contains a PPK (PuTTY Private Key).
PPKBlobThe certificate store is a string (binary) that contains a PPK (PuTTY Private Key).

Default Value

0

CertSubject Property (Get-SFTP Cmdlet)

The subject of the certificate used for client authentication.

Syntax

Get-SFTP -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

"*"

CompressionAlgorithms Property (Get-SFTP Cmdlet)

A comma-separated list containing all allowable compression algorithms.

Syntax

Get-SFTP -CompressionAlgorithms string

Remarks

During the SSH handshake, this list will be used to negotiate the compression algorithm to be used between the client and server. This list is used for both directions: client to server and server to client. When negotiating algorithms, each side sends a list of all algorithms it supports or allows. The algorithm chosen for each direction is the first algorithm to appear in the sender's list that the receiver supports, so it is important to list multiple algorithms in preferential order. If no algorithm can be agreed upon, the cmdlet will raise an error and the connection will be aborted.

At least one support algorithm must appear in this list. The following compression algorithms are supported by the cmdlet:

  • zlib
  • zlib@openssh.com
  • none

Default Value

"none"

Config Property (Get-SFTP Cmdlet)

Specifies one or more configuration settings.

Syntax

Get-SFTP -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 (Get-SFTP Cmdlet)

The PSCredential object to use for user/password authentication.

Syntax

Get-SFTP -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

EncryptionAlgorithms Property (Get-SFTP Cmdlet)

A comma-separated list containing all allowable compression algorithms.

Syntax

Get-SFTP -EncryptionAlgorithms string

Remarks

During the SSH handshake, this list will be used to negotiate the encryption algorithm to be used between the client and server. This list is used for both directions: client to server and server to client. When negotiating algorithms, each side sends a list of all algorithms it supports or allows. The algorithm chosen for each direction is the first algorithm to appear in the sender's list that the receiver supports, so it is important to list multiple algorithms in preferential order. If no algorithm can be agreed upon, the cmdlet will raise an error and the connection will be aborted.

At least one support algorithm must appear in this list. The following encryption algorithms are supported by the cmdlet:

aes256-ctr256-bit AES encryption in CTR mode
aes256-cbc256-bit AES encryption in CBC mode
aes192-ctr192-bit AES encryption in CTR mode
aes192-cbc192-bit AES encryption in CBC mode
aes128-ctr128-bit AES encryption in CTR mode
aes128-cbc128-bit AES encryption in CBC mode
3des-ctr192-bit (3-key) triple DES encryption in CTR mode
3des-cbc192-bit (3-key) triple DES encryption in CBC mode
cast128-cbcCAST-128 encryption
blowfish-cbcBlowfish encryption
arcfourARC4 encryption
arcfour128128-bit ARC4 encryption
arcfour256256-bit ARC4 encryption
aes256-gcm@openssh.com256-bit AES encryption in GCM mode.
aes128-gcm@openssh.com128-bit AES encryption in GCM mode.

By default, "aes256-cbc", the only encryption algorithm recommended by the SSH specification, and "3des-cbc", the only algorithm required, are enabled. It is not recommended to enable "none", as this defeats the purpose of an SSH connection.

Default Value

"aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,arcfour256,arcfour128,arcfour,cast128-cbc,aes256-gcm@openssh.com,aes128-gcm@openssh.com"

FirewallHost Property (Get-SFTP Cmdlet)

Name or IP address of firewall.

Syntax

Get-SFTP -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 (Get-SFTP Cmdlet)

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

Syntax

Get-SFTP -FirewallPassword string

Remarks

If FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to authenticate against the firewall.

Default Value

""

FirewallPort Property (Get-SFTP Cmdlet)

The port of the firewall to which to connect.

Syntax

Get-SFTP -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 (Get-SFTP Cmdlet)

Determines the type of firewall to connect through.

Syntax

Get-SFTP -FirewallType string

Remarks

The applicable values are the following:

None No firewall (default setting).
TunnelConnect through a tunneling proxy. FirewallPort is set to 80.
SOCKS4Connect through a SOCKS4 Proxy. FirewallPort is set to 1080.
SOCKS5Connect through a SOCKS5 Proxy. FirewallPort is set to 1080.

Default Value

0

FirewallUser Property (Get-SFTP Cmdlet)

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

Syntax

Get-SFTP -FirewallUser string

Remarks

If FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to authenticate against the firewall.

Default Value

""

Force Property (Get-SFTP Cmdlet)

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

Syntax

Get-SFTP -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

List Property (Get-SFTP Cmdlet)

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

Syntax

Get-SFTP -List string

Remarks

Set List to a path and file mask to cause the contents of that directory matching that mask to be listed. The path can be a relative directory or an absolute path, but directories must be separated using the "/" separator.

Default Value

""

Parameter Alias

Path

LocalFile Property (Get-SFTP Cmdlet)

The local file to download to.

Syntax

Get-SFTP -LocalFile string

Remarks

LocalFile contains the full path and filename on your machine that the RemoteFile will be saved to.

Default Value

""

LocalIP Property (Get-SFTP Cmdlet)

The IP address of the local interface to use.

Syntax

Get-SFTP -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 (Get-SFTP Cmdlet)

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

Syntax

Get-SFTP -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

""

Overwrite Property (Get-SFTP Cmdlet)

Indicates whether the LocalFile may be overwritten.

Syntax

Get-SFTP -Overwrite SwitchParameter

Remarks

If the LocalFile exists on the machine and Overwrite is false, the download will fail.

Default Value

false

Password Property (Get-SFTP Cmdlet)

The password to use for authentication.

Syntax

Get-SFTP -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

""

PasswordPrompt Property (Get-SFTP Cmdlet)

The shell prompt used for keyboard-interactive authentication.

Syntax

Get-SFTP -PasswordPrompt string

Remarks

If AuthMode is set to Keyboard-Interactive, the shell's password prompt must be specified in PasswordPrompt. At connection, the cmdlet will wait for the PasswordPrompt and provide the Password when it is received.

Default Value

"password"

Port Property (Get-SFTP Cmdlet)

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

Syntax

Get-SFTP -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.

Default Value

22

RemoteFile Property (Get-SFTP Cmdlet)

The name of the remote file to download.

Syntax

Get-SFTP -RemoteFile string

Remarks

The RemoteFile is either an absolute file path, or a relative path based on the home path set by the server. This value must include a filemask or filename. For instance: get-ftp -server TestServer -user test -password test -remotefile MyFolder/*.txt The above code will download all .txt files in the MyFolder folder.

Default Value

""

Parameter Position

1

Parameter Alias

Download

Server Property (Get-SFTP Cmdlet)

The address of the Server.

Syntax

Get-SFTP -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.

SSHAccept Property (Get-SFTP Cmdlet)

The hex-encoded fingerprint of the host to trust explicitly.

Syntax

Get-SFTP -SSHAccept string

Remarks

The fingerprint will be an MD5 hash of the host key in hex-encoded form, i.e. "0a:1b:2c:3d". Setting this will instruct the cmdlet to trust the fingerprint provided without prompting for verification.

After each connection, regardless of whether or not the key was trusted, the cmdlet will store the server's host key in the $SSHServerHostKey session variable. This variable can be inspected to view details of the server's key.

If the Force parameter is set, the cmdlet will accept the server's key unconditionally.

In cases where the host key 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 host key 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 $SSHAcceptPreference variable prior to running the cmdlet. The available values for this variable are:

None (default)Maintains the default behavior. If the host key is not trusted by default, the user will be prompted.
AcceptAccepts the host key without prompting the user, even if it is not trusted by default.
RejectRejects the host key without prompting the user only if it is not trusted by default. Thus if the host key is found to be trusted or the Force parameter is set, the connection will still be accepted.

Default Value

""

Parameter Alias

Fingerprint

Timeout Property (Get-SFTP Cmdlet)

The maximum time allowed for the operation.

Syntax

Get-SFTP -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 (Get-SFTP Cmdlet)

The username to use for authentication.

Syntax

Get-SFTP -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

""

EntryInfo Output Object (Get-SFTP Cmdlet)

This object contains details about a file returned from the FTP Server .

Syntax

Object EntryInfo {
   string DirEntry;
   string FileName;
   long FileSize;
   string FileTime;
   bool IsDir;
}

Remarks

After using List to retrieve a directory list from the FTP Server, information about each entry returned in that listing will be stored in one or more EntryInfo objects.

In Unix systems the date is given in two types of formats: If the date is in the last 12 months the exact time is specified and the year is omitted. Otherwise only the date and the year but not hours or minutes are given.

FTPFile Output Object (Get-SFTP 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 (Get-SFTP 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.

SFTP Config Settings

AllowBackslashInName:   Whether backslashes are allowed in folder and file names.

By default the backslash character is treated as a path separator and is not allowed in file and folder names. When this configuration setting is set to True, backslashes "\" are allowed in file and folder names, and are not supported as path separators.

The default value is False.

AsyncTransfer:   Controls whether simultatenous requests are made to read or write files.

When set to true, the cmdlet will make several requests to read or write data before waiting for a response from the server. The maximum number of these requests that can be made is controlled by MaxOutstandingPackets. The default is true.

AttrAccessTime:   Can be queried for the AccessTime file attribute during the DirList event.

During DirList, this configuration setting can be queried to retrieve the value of the AccessTime file attribute if it is present in the response from the server.

AttrCreationTime:   Can be queried for the CreationTime file attribute during the DirList event.

During DirList, this configuration setting can be queried to retrieve the value of the CreationTime file attribute if it is present in the response from the server.

AttrFileType:   Can be queried for the FileType file attribute during the DirList event.

During DirList, this configuration setting can be queried to retrieve the value of the FileType file attribute if it is present in the response from the server.

AttrGroupId:   Can be queried for the GroupId file attribute during the DirList event.

During DirList, this configuration setting can be queried to retrieve the value of the GroupId file attribute if it is present in the response from the server.

AttrLinkCount:   Can be queried for the LinkCount file attribute during the DirList event.

During DirList, this configuration setting can be queried to retrieve the value of the LinkCount file attribute if it is present in the response from the server.

AttrOwnerId:   Can be queried for the OwnerId file attribute during the DirList event.

During DirList, this configuration setting can be queried to retrieve the value of the OwnerId file attribute if it is present in the response from the server.

AttrPermission:   Can be queried for the Permissions file attribute during the DirList event.

During DirList, this configuration setting can be queried to retrieve the value of the Permissions file attribute if it is present in the response from the server.

CheckFileHash:   Compares a server-computed hash with a hash calculated locally.

This setting may be queried to compare a hash of the file specified by RemoteFile with the hash calculated by the server. When queried the cmdlet will ask the server to calculate a hash of the file. It will then compute a hash locally and compare the values to confirm the content that exists in the file specified by RemoteFile is the same as the file specified by LocalFile.

The server must support the check-file extension.

The cmdlet supports the following hash algorithms (in order of preference): sha256,sha224,sha384,sha512,sha1,md5. The server may choose to use any value from this list. No action is needed to configure the algorithm, the cmdlet will automatically use the same algorithm that the server users.

If the extension is unsupported or a mismatch in hashes is detected the cmdlet throws an exception. If the hashes match the value "True" is returned. try { String flag = sftp.Config("CheckFileHash"); // flag will be equal to "True" } catch (Exception e) { // mismatch }

DisableRealPath:   Controls whether or not the SSH_FXP_REALPATH request is sent.

This configuration setting can be used to skip sending the SSH_FXP_REALPATH request, which asks the server to canonicalize the value in RemotePath to an absolute path. The default value is false, which will cause the component to send the request normally. If set to true, component will not send the SSH_FXP_REALPATH packet and will use the value in RemotePath directly.

ExcludeFileMask:   Specifies a file mask for excluding files in directory listings.

This configuration setting specifies one or more file masks to be excluded during a directory listing. When using multiple masks, any files that match one or more of the masks will not be listed. For example, setting ExcludeFileMask to "*.txt", RemoteFile to "", and calling ListDirectory will list all files except those ending in .txt.

FileMaskDelimiter:   Specifies a delimiter to use for setting multiple file masks in the RemoteFile property.

If specified, the RemoteFile property will be split into separate masks based on the chosen delimiter. The default is "", which will cause the RemoteFile property to be treated as a single value. When using multiple masks, any files that match one or more of the masks will be listed. For example, setting FileMaskDelimiter to "," and setting RemoteFile to "*.txt, *.csv" will list all files ending in .txt or .csv.

FiletimeFormat:   Specifies the format to use when returning filetime strings.

If specified, the cmdlet will use this value to format the filetime string returned through the DirList event. If no format is specified, the cmdlet will format the date dependent on the year. If the filetime is in the same year, it will be formatted as "MMM dd HH:mm", otherwise it will be formatted as "MMM dd yyyy".

FreeSpace:   The free space on the remote server in bytes.

This property is populated after calling the GetSpaceInfo configuration setting. This holds the total free space available on the drive on the remote server in bytes.

GetSpaceInfo:   Queries the server for drive usage information.

This setting queries the server for the total space and free space available on the remote drive. When querying this setting the cmdlet will immediately request the information from the server. After calling this setting the TotalSpace and FreeSpace configuration settings will be populated.

Note: The server must understand either the "statvfs@openssh.com" or "space-available" extension in order for this operation to succeed.

GetSymlinkAttrs:   Whether to get the attributes of the symbolic link, or the resource pointed to by the link.

When FileAttributes is queried the cmdlet will retrieve information about the RemoteFile. This setting controls the behavior when RemoteFile refers to a symbolic link on the server. By default the information returned by FileAttributes is that of the actual file pointed to by the symbolic link, not the symbolic link itself.

If it is desired to retrieve the attributes of the symbolic link itself, set GetSymlinkAttrs to True before querying FileAttributes.

IgnoreFileMaskCasing:   Controls whether or not the file mask is case sensitive.

This applies to the file mask value specified by the RemoteFile property. The default value is true. If set to false, the file mask will be case sensitive.

LocalEOL:   When TransferMode is set, this specifies the line ending for the local system.

This setting is only applicable when TransferMode is set to 1 (ASCII). The default value is a CrLf character sequence.

When uploading or downloading this value will be compared to ServerEOL. If ServerEOL and LocalEOL are different, the line endings in the file being transferred will be converted to the line endings used by the destination. Line endings will be converted to the value in LocalEOL when downloading. Line endings will be converted to the value in ServerEOL when uploading. If ServerEOL and LocalEOL are the same, no conversion takes place.

The value supplied to this setting must be quoted. For instance: component.Config("LocalEOL=\"" + myEOLSequence + "\""); Where myEOLSequence is a Cr, Lf, or CrLf character sequence.

Conversion will only happen when TransferMode is set to 1 (ASCII) and ServerEOL and LocalEOL are different.

LogSFTPFileData:   Whether SFTP file data is present in Debug logs.

This setting controls whether file data is logged when LogLevel is set to 3 (Debug). When False (default) the file data being transferred is not included. Set this value to True to include all traffic include file data. Note: setting this value to True will increase the amount of data that is logged.

MaskSensitive:   Masks passwords in logs.

The default value is True. When set to True, the cmdlet will mask passwords that otherwise would appear in its logs.

MaxFileData:   Specifies the maximum payload size of an SFTP packet.

While the SSH specification requires servers and clients to support SSH packets of at least 32000 bytes, some server implementations limit packet size to smaller values. MaxFileData provides a means by which the user can specify the maximum amount of data that can be put into an SFTP packet so that the cmdlet can communicate effectively with these servers. If you are having difficulty when uploading to a server, try setting MaxFileData size to a value smaller than 32000.

Most servers that use smaller values will use a maximum SSH packet size of 16KB (16384). In order to most efficiently communicate with such servers, MaxFileData size should be set to 14745.

Note: Values larger than 64K (65536) may not be respected by some servers (such as OpenSSH) and will result in unexpected behavior. If specifying a value, it is recommended to set a value less than or equal to 65536.

The default value is 32768.

MaxOutstandingPackets:   Sets the maximum number of simultaneous read or write requests allowed.

This sets the number of simultaneous read or write requests allowed. This setting only applies when AsyncTransfer is true. The default is 8.

NegotiatedProtocolVersion:   The negotiated SFTP version.

This returns the negotiated version of SFTP. Query this to ensure that the correct version was negotiated. This configuration setting is read-only.

NormalizeRemotePath:   Whether to normalize the RemotePath.

When set to true, the component will normalize the value in RemotePath by appending a forward slash (/) if one is not already present. "." and ".." are special cases and will not be affected. The default is true.

PreserveFileTime:   Preserves the file's timestamps during transfer.

If set to True, the cmdlet will preserve the file's timestamps during transfer. This is applicable to both uploads and downloads. The default value is False.

ProtocolVersion:   The highest allowable SFTP version to use.

This governs the highest allowable SFTP version to use when negotiating the version with the server. The default value is 3 as this is the most common version. The cmdlet supports values from 3 to 6. It is recommended to use the default value of 3 unless there is a specific reason a higher version is needed.

ReadLink:   This settings returns the target of a specified symbolic link.

This setting returns the target of the specified symbolic link. To use the setting, pass the remote path and file name of the symbolic link. For instance: string resolvedPath = component.Config("ReadLink=/home/test/mysymlink.txt");

RealTimeUpload:   Enables real time uploading.

When this value is set to "True" the cmdlet will upload the data in the file specified by LocalFile and continue monitoring LocalFile for additional data to upload until no new data is found for RealTimeUploadAgeLimit seconds. This allows you to start uploading a file immediately after the file is created and continue uploading as data is written to the file. The default value is "False".

RealTimeUploadAgeLimit:   The age limit in seconds when using RealTimeUpload.

This value is only applicable when RealTimeUpload is set to "True". This specifies the number of seconds for which the cmdlet will monitor LocalFile for new data to upload. If this limit is reached and no new data is found in LocalFile the upload will complete. The default value is "1".

ServerEOL:   When TransferMode is set, this specifies the line ending for the remote system.

This setting is only applicable when TransferMode is set to 1 (ASCII). The default value is a CrLf character sequence.

When uploading or downloading this value will be compared to LocalEOL. If ServerEOL and LocalEOL are different, the line endings in the file being transferred will be converted to the line endings used by the destination. Line endings will be converted to the value in LocalEOL when downloading. Line endings will be converted to the value in ServerEOL when uploading. If ServerEOL and LocalEOL are the same, no conversion takes place.

The value supplied to this setting must be quoted. For instance: component.Config("ServerEOL=\"" + myEOLSequence + "\""); Where myEOLSequence is a Cr, Lf, or CrLf character sequence.

Conversion will only happen when TransferMode is set to 1 (ASCII) and ServerEOL and LocalEOL are different.

SimultaneousTransferLimit:   The maximum number of simultaneous file transfers.

This setting specifies the maximum number of simultaneous file transfers. This is used when processing files added to the transfer queue by QueueFile. The default value is "5".

TotalSpace:   The total space on the remote server in bytes.

This property is populated after calling the GetSpaceInfo configuration setting. This holds the total space on the drive on the remote server in bytes.

TransferMode:   The transfer mode (ASCII or Binary).

The value 0 represents Binary and the value 1 represents ASCII. If the value is 0 (default), the initial server mode will be used.

When this value is set to 1 (ASCII) the cmdlet will use the values specified in LocalEOL and ServerEOL to convert line endings as appropriate.

Note: When this value is set to 1 (ASCII) and ProtocolVersion is set to 4 or higher the cmdlet will automatically determine the value for ServerEOL if the server supports the "newline" protocol extension.

TransferredDataLimit:   Specifies the maximum number of bytes to download from the remote file.

This setting specifies the maximum number of bytes which should be downloaded from the current RemoteFile when Download is called. The cmdlet will stop downloading data if it reaches the specified limit, or if there is no more data to download.

This setting can be used in conjunction with the StartByte property in order to download a specific range of data from the current RemoteFile.

UseFxpStat:   Whether SSH_FXP_STAT is sent.

For certain operations the cmdlet will send SSH_FXP_STAT to get a file's attributes. Some servers do not support this packet and will return an error.

Set this to false to not send the packet. This will cause PreserveFileTime to not work and prevent PercentDone in Transfer from being calculated.

The default is true.

UseServerFileTime:   Controls if the file time returned from the server is converted to local time or not.

If set to false the component will return the filetime as the system's local time, otherwise it will return with the time as it is reported by the server. Controls if the file time returned from the server is converted to local time or not.

If set to false the component will return the filetime as the system's local time, otherwise it will return with the time as it is reported by the server. The default is false.

UseServerFileTime:   Controls if the file time returned from the server is converted to local time or not.

If set to false the component will return the filetime as the system's local time, otherwise it will return with the time as it is reported by the server. Controls if the file time returned from the server is converted to local time or not.

If set to false the component will return the filetime as the system's local time, otherwise it will return with the time as it is reported by the server. The default is false.

SSHClient Config Settings

ChannelDataEOL[ChannelId]:   Used to break the incoming data stream into chunks.

By default MaxChannelDataLength is 0 and ChannelDataEOL is an empty string. SSHChannelData fires whenever an SSH_MSG_CHANNEL_DATA packet is received.

If MaxChannelDataLength > 0 and ChannelDataEOL is a non-empty string the cmdlet will internally buffer data waiting to fire SSHChannelData until either MaxChannelDataLength is reached or ChannelDataEOL is found, whichever comes first. Query ChannelDataEOLFound to know which condition was met. The buffer is reset any time SSHChannelData fires.

ChannelDataEOL and MaxChannelDataLength MUST be set together or unexpected behavior could occur.

ChannelDataEOLFound[ChannelId]:   Determines if ChannelDataEOL was found.

If true,then ChannelDataEOL was found. If false, then MaxChannelDataLength was reached.

This config is only valid when queried inside SSHChannelData, MaxChannelDataLength > 0, and ChannelDataEOL is non-empty.

ClientSSHVersionString:   The SSH version string used by the cmdlet.

This configuration setting specifies the SSH version string used by the cmdlet. The default value is "SSH-2.0-IPWorks SSH Client 2022".

Most SSH servers expect the SSH version string to have the expected format "SSH-protocol version-software version". See above for an example.

EnablePageantAuth:   Whether to use a key stored in Pageant to perform client authentication.

This setting controls whether Pageant authentication is disabled, enabled, or required. When enabled or required, the cmdlet attempts to communicate with PuTTY's ssh-agent, called "Pageant", over shared memory to perform public key authentication. Possible values and the corresponding behavior is described below:

ValueDescription
0 (Disabled - default) No communication with Pageant is attempted.
1 (Enabled) Pageant authentication is used if available. If Pageant is not running, or does not contain the expected key no error is thrown.
2 (Required) Only Pageant authentication is used. If Pageant is not running, or does not contain the expected key an error is thrown.

Example enabling Pageant: component.Config("EnablePageantAuth=1"); component.SSHUser = "sshuser"; component.SSHLogon("localhost", 22);

Note: This functionality is only available on Windows.

KerberosDelegation:   If true, asks for credentials with delegation enabled during authentication.

The default value is "True". If set to "False", the client will not ask for credentials delegation support during authentication. Note that even if the client asks for delegation, the server/KDC might not grant it and authentication will still succeed.

KerberosRealm:   The fully qualified domain name of the Kerberos Realm to use for GSSAPI authentication.

This property may be set to the fully qualified (DNS) name of the kerberos realm (or Windows Active Directory domain name) to use during GSSAPI authentication. This can be used to force authentication with a given realm if the client and server machines are not part of the same domain.

KerberosSPN:   The Kerberos Service Principal Name of the SSH host.

This property can be set to specify the Service Principal Name (SPN) associated with the SSH service on the remote host. This will usually be in the form "host/fqdn.of.sshhost[@REALM]". If not specified, the cmdlet will assume the SPN is based on the value of the SSHHost property and the kerberos realm used for authentication.

KeyRenegotiationThreshold:   Sets the threshold for the SSH Key Renegotiation.

This property allows you to specify the threshold, in the number of bytes, for the SSH Key Renegotiation. The default value for this property is set to 1 GB.

Example (for setting the threshold to 500 MB): SSHComponent.Config("KeyRenegotiationThreshold=524288000")

LogLevel:   Specifies the level of detail that is logged.

This setting controls the level of detail that is logged through the Log event. Possible values are:

0 (None) No messages are logged.
1 (Info - Default) Informational events such as SSH handshake messages are logged.
2 (Verbose) Detailed data such as individual packet information is logged.
3 (Debug) Debug data including all relevant sent and received bytes are logged.

MaxChannelDataLength[ChannelId]:   The maximum amount of data to accumulate when no ChannelDataEOL is found.

By default MaxChannelDataLength is 0 and ChannelDataEOL is an empty string. SSHChannelData fires whenever an SSH_MSG_CHANNEL_DATA packet is received.

If MaxChannelDataLength > 0 and ChannelDataEOL is a non-empty string the cmdlet will internally buffer data waiting to fire SSHChannelData until either MaxChannelDataLength is reached or ChannelDataEOL is found, whichever comes first. Query ChannelDataEOLFound to know which condition was met. The buffer is reset any time SSHChannelData fires.

ChannelDataEOL and MaxChannelDataLength MUST be set together or unexpected behavior could occur.

MaxPacketSize:   The maximum packet size of the channel, in bytes.

This setting specifies the maximum size of an individual data packet, in bytes, that can be sent to the sender.

MaxWindowSize:   The maximum window size allowed for the channel, in bytes.

This setting specifies how many bytes of channel data can be sent to the sender of this message without adjusting the window. Note that this value may be changed during the connection, but the window size can only be increased, not decreased.

PasswordPrompt:   The text of the password prompt used in keyboard-interactive authentication.

This setting optionally specifies a pattern to be matched to the prompt received from the server during keyboard-interactive authentication. If a matching prompt is detected the cmdlet automatically responds to the prompt with the password specified by SSHPassword.

This provides an easy way to automatically reply to prompts with the password if one is presented by the server. The password will be auto-filled in the Response parameter of the SSHKeyboardInteractive event in the case of a match.

The following special characters are supported for pattern matching:

? Any single character.
* Any characters or no characters (e.g., C*t matches Cat, Cot, Coast, Ct).
[,-] A range of characters (e.g., [a-z], [a], [0-9], [0-9,a-d,f,r-z]).
\ The slash is ignored and exact matching is performed on the next character.

If these characters need to be used as a literal in a pattern, then they must be escaped by surrounding them with brackets []. Note: "]" and "-" do not need to be escaped. See below for the escape sequences:

CharacterEscape Sequence
? [?]
* [*]
[ [[]
\ [\]

For example, to match the value [Something].txt, specify the pattern [[]Something].txt.

PreferredDHGroupBits:   The size (in bits) of the preferred modulus (p) to request from the server.

This may be when using the diffie-hellman-group-exchange-sha1 or diffie-hellman-group-exchange-sha256 key exchange algorithms to control the preferred size, in bits, of the modulus (p) prime number to request from the server. Acceptable values are between 1024 and 8192.

RecordLength:   The length of received data records.

If set to a positive value, this setting defines the length of data records to be received. The cmdlet will accumulate data until RecordLength is reached and only then fire the DataIn event with data of length RecordLength. This allows data to be received as records of known length. This value can be changed at any time, including within the DataIn event.

The default value is 0, meaning this setting is not used.

ServerSSHVersionString:   The remote host's SSH version string.

This will return the remote host's SSH version string, which can help when identifying problematic servers. This configuration setting is read-only.

SignedSSHCert:   The CA signed client public key used when authenticating.

When authenticating via public key authentication this setting may be set to the CA signed client's public key. This is useful when the server has been configured to trust client keys signed by a particular CA. For instance: component.Config("SignedSSHCert=ssh-rsa-cert-v01@openssh.com AAAAB3NzaC1yc2EAAAADAQABAAAB..."); The algorithm such as ssh-rsa-cert-v01@openssh.com in the above string is used as part of the authentication process. To use a different algorithm simply change this value. For instance all of the following are acceptable with the same signed public key:

  • ssh-rsa-cert-v01@openssh.com AAAAB3NzaC1yc2EAAAADAQABAAAB...
  • rsa-sha2-256-cert-v01@openssh.com AAAAB3NzaC1yc2EAAAADAQABAAAB...
  • rsa-sha2-512-cert-v01@openssh.com AAAAB3NzaC1yc2EAAAADAQABAAAB...

SSHAcceptAnyServerHostKey:   If set the cmdlet will accept any key presented by the server.

The default value is "False". Set this to "True" to accept any key presented by the server.

SSHAcceptServerCAKey:   The CA public key that signed the server's host key.

If the server's host key was signed by a CA, this setting may be used to specify the CA's public key. If specified the cmdlet will trust any server's host key that was signed by the CA. For instance: component.Config("SSHAcceptServerCAKey=ssh-rsa AAAAB3NzaC1yc2EAAAADAQAB...");

SSHAcceptServerHostKeyFingerPrint:   The fingerprint of the server key to accept.

This may be set to a comma-delimited collection of 16-byte MD5 fingerprints that should be accepted as the host's key. You may supply it by HEX encoding the values in the form "0a:1b:2c:3d". Example: SSHClient.Config("SSHAcceptServerHostKeyFingerprint=0a:1b:2c:3d"); If the server's fingerprint matches one of the values supplied, the cmdlet will accept the host key.

SSHFingerprintHashAlgorithm:   The algorithm used to calculate the fingerprint.

This configuration setting controls which hash algorithm is used to calculate the hostkey's fingerprint, displayed when SSHServerAuthentication fires. Valid values are:

  • MD5
  • SHA1
  • SHA256 (default)
SSHFingerprintMD5:   The server hostkey's MD5 fingerprint.

This setting may be queried in SSHServerAuthentication to get the server hostkey's MD5 fingerprint.

SSHFingerprintSHA1:   The server hostkey's SHA1 fingerprint.

This setting may be queried in SSHServerAuthentication to get the server hostkey's SHA1 fingerprint.

SSHFingerprintSHA256:   The server hostkey's SHA256 fingerprint.

This setting may be queried in SSHServerAuthentication to get the server hostkey's SHA256 fingerprint.

SSHKeepAliveCountMax:   The maximum number of keep alive packets to send without a response.

This setting specifies the maximum number of keep alive packets to send when no response is received. Normally a response to a keep alive packet is received right away. If no response is received the cmdlet will continue to send keep alive packets until SSHKeepAliveCountMax is reached. If this is reached the cmdlet will assume the connection is broken and disconnect. The default value is 5.

SSHKeepAliveInterval:   The interval between keep alive packets.

This setting specifies the number of seconds between keep alive packets. If set to a positive value the cmdlet will send a SSH keep alive packet after KeepAliveInterval seconds of inactivity. This setting only takes effect when there is no activity, if any data is sent or received over the connection it will reset the timer.

The default value is 0 meaning no keep alives will be sent.

Note: The SSHREVERSETUNNEL cmdlet uses a default value of 30.

SSHKeyExchangeAlgorithms:   Specifies the supported key exchange algorithms.

This may be used to specify the list of supported key exchange algorithms used during SSH negotiation. The value should contain a comma separated list of algorithms. Supported algorithms are:

  • curve25519-sha256
  • curve25519-sha256@libssh.org
  • diffie-hellman-group1-sha1
  • diffie-hellman-group14-sha1
  • diffie-hellman-group14-sha256
  • diffie-hellman-group16-sha512
  • diffie-hellman-group18-sha512
  • diffie-hellman-group-exchange-sha256
  • diffie-hellman-group-exchange-sha1
  • ecdh-sha2-nistp256
  • ecdh-sha2-nistp384
  • ecdh-sha2-nistp521
  • gss-group14-sha256-toWM5Slw5Ew8Mqkay+al2g==
  • gss-group16-sha512-toWM5Slw5Ew8Mqkay+al2g==
  • gss-nistp256-sha256-toWM5Slw5Ew8Mqkay+al2g==
  • gss-curve25519-sha256-toWM5Slw5Ew8Mqkay+al2g==
  • gss-group14-sha1-toWM5Slw5Ew8Mqkay+al2g==
  • gss-gex-sha1-toWM5Slw5Ew8Mqkay+al2g==
The default value is: curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,gss-group14-sha256-toWM5Slw5Ew8Mqkay+al2g==,gss-group16-sha512-toWM5Slw5Ew8Mqkay+al2g==,gss-nistp256-sha256-toWM5Slw5Ew8Mqkay+al2g==,gss-curve25519-sha256-toWM5Slw5Ew8Mqkay+al2g==,gss-group14-sha1-toWM5Slw5Ew8Mqkay+al2g==,gss-gex-sha1-toWM5Slw5Ew8Mqkay+al2g==.
SSHKeyRenegotiate:   Causes the component to renegotiate the SSH keys.

Once this setting is queried, the component will renegotiate the SSH keys with the remote host.

Example: SSHClient.Config("SSHKeyRenegotiate")

SSHMacAlgorithms:   Specifies the supported Mac algorithms.

This may be used to specify an alternate list of supported Mac algorithms used during SSH negotiation. This also specifies the order in which the Mac algorithms are preferred. The value should contain a comma separated list of algorithms. Supported algorithms are:

  • hmac-sha1
  • hmac-md5
  • hmac-sha1-96
  • hmac-md5-96
  • hmac-sha2-256
  • hmac-sha2-256-96
  • hmac-sha2-512
  • hmac-sha2-512-96
  • hmac-ripemd160
  • hmac-ripemd160-96
  • hmac-sha2-256-etm@openssh.com
  • hmac-sha2-512-etm@openssh.com
  • umac-64@openssh.com
  • umac-64-etm@openssh.com
  • umac-128@openssh.com
  • umac-128-etm@openssh.com
The default value is hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5,hmac-ripemd160,hmac-sha1-96,hmac-md5-96,hmac-sha2-256-96,hmac-sha2-512-96,hmac-ripemd160-96,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,umac-64@openssh.com,umac-64-etm@openssh.com,umac-128@openssh.com,umac-128-etm@openssh.com.
SSHPubKeyAuthSigAlgorithms:   Specifies the enabled signature algorithms that may be used when attempting public key authentication.

This setting specifies a list of signature algorithms that may be used when authenticating to the server using public key authentication. This applies only when public key authentication is performed by the client.

The setting should be a comma separated list of algorithms. At runtime the cmdlet will evaluate the specified algorithms and if the algorithm is applicable to the certificate specified in SSHCert it will be used. If the algorithm is not applicable the cmdlet will evaluate the next algorithm. Possible values are:

  • ssh-rsa
  • rsa-sha2-256
  • rsa-sha2-512
  • ssh-dss
  • ecdsa-sha2-nistp256
  • ecdsa-sha2-nistp384
  • ecdsa-sha2-nistp521
  • ssh-ed25519
  • x509v3-sign-rsa
  • x509v3-sign-dss

The default value in Windows is ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519.

rsa-sha2-256 and rsa-sha2-512 notes

The cmdlet will query the server for supported algorithms when connecting. If the server indicates support for rsa-sha2-256 or rsa-sha2-512 and the algorithm is present in the list defined by this setting (as in the default value), that algorithm will be used instead of ssh-rsa even when ssh-rsa appears first in the list.

For the rsa-sha2-256 and rsa-sha2-512 algorithms to be automatically preferred the server must support the ext-info-c mechanism. In practice, older servers do not support this and in that case ssh-rsa will be used since it appears first in the list. Newer servers do support this mechanism and in that case rsa-sha2-256 or rsa-sha2-512 will be used even though it appears after ssh-rsa.

This behavior has been carefully designed to provide maximum compatibility while automatically using more secure algorithms when connecting to servers which support them.

SSHPublicKeyAlgorithms:   Specifies the supported public key algorithms for the server's public key.

This setting specifies the allowed public key algorithms for the server's public key. This list controls only the public key algorithm used when authenticating the server's public key. This list has no bearing on the public key algorithms that can be used by the client when performing public key authentication to the server. The default value is ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-256,rsa-sha2-512,ssh-rsa,ssh-dss,x509v3-sign-rsa,x509v3-sign-dss.

SSHVersionPattern:   The pattern used to match the remote host's version string.

This configuration setting specifies the pattern used to accept or deny the remote host's SSH version string. It takes a comma-delimited list of patterns to match. The default value is "*SSH-1.99-*,*SSH-2.0-*" and will accept connections from SSH 1.99 and 2.0 hosts. As an example, the below value would accept connections for SSH 1.99, 2.0, and 2.99 hosts.

*SSH-1.99-*,*SSH-2.0-*,*SSH-2.99-*
TryAllAvailableAuthMethods:   If set to true, the cmdlet will try all available authentication methods.

The default value is false. When set to true, the cmdlet will try to authenticate using all methods that it has credentials for and the server supports.

WaitForChannelClose:   Whether to wait for channels to be closed before disconnected.

This setting controls whether the cmdlet will wait for a server response to the SSH_MSG_CHANNEL_CLOSE when disconnecting. When the cmdlet disconnects it will first attempt to close all open channels by sending a SSH_MSG_CHANNEL_CLOSE for each channel. This setting controls whether the cmdlet will wait for a server response after sending the messages.

When True (default) the cmdlet will wait for a response to the channel close message until the responses have been received, the server closes the connection, or Timeout seconds is reached.

When False the cmdlet will still send the channel close messages but will not wait for a response and will proceed to close the connection.

WaitForServerDisconnect:   Whether to wait for the server to close the connection.

This setting controls whether to wait for the server to close the connection when SSHLogoff is called.

When set to True the cmdlet will initiate the disconnection sequence by sending SSH_MSG_DISCONNECT but will not close the connection, and instead will wait for the server to close the connection. Setting this to True may be beneficial in circumstances where many connections are being established, to avoid port exhaustion when sockets are in a TIME_WAIT state. Allowing the server to close the connection avoids the TIME_WAIT state of socket on the client machine.

When set to False (default) the client will close the connection. It is recommended to use this value unless there is a specific need to change it.

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:

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.
10Connect through a SOCKS4A Proxy. FirewallPort is set to 1080.

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:

0 IPv4 Only
1 IPv6 Only
2 IPv6 with IPv4 fallback

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:

IdentifierName
037IBM EBCDIC - U.S./Canada
437OEM - United States
500IBM EBCDIC - International
708Arabic - ASMO 708
709Arabic - ASMO 449+, BCON V4
710Arabic - Transparent Arabic
720Arabic - Transparent ASMO
737OEM - Greek (formerly 437G)
775OEM - Baltic
850OEM - Multilingual Latin I
852OEM - Latin II
855OEM - Cyrillic (primarily Russian)
857OEM - Turkish
858OEM - Multilingual Latin I + Euro symbol
860OEM - Portuguese
861OEM - Icelandic
862OEM - Hebrew
863OEM - Canadian-French
864OEM - Arabic
865OEM - Nordic
866OEM - Russian
869OEM - Modern Greek
870IBM EBCDIC - Multilingual/ROECE (Latin-2)
874ANSI/OEM - Thai (same as 28605, ISO 8859-15)
875IBM EBCDIC - Modern Greek
932ANSI/OEM - Japanese, Shift-JIS
936ANSI/OEM - Simplified Chinese (PRC, Singapore)
949ANSI/OEM - Korean (Unified Hangul Code)
950ANSI/OEM - Traditional Chinese (Taiwan; Hong Kong SAR, PRC)
1026IBM EBCDIC - Turkish (Latin-5)
1047IBM EBCDIC - Latin 1/Open System
1140IBM EBCDIC - U.S./Canada (037 + Euro symbol)
1141IBM EBCDIC - Germany (20273 + Euro symbol)
1142IBM EBCDIC - Denmark/Norway (20277 + Euro symbol)
1143IBM EBCDIC - Finland/Sweden (20278 + Euro symbol)
1144IBM EBCDIC - Italy (20280 + Euro symbol)
1145IBM EBCDIC - Latin America/Spain (20284 + Euro symbol)
1146IBM EBCDIC - United Kingdom (20285 + Euro symbol)
1147IBM EBCDIC - France (20297 + Euro symbol)
1148IBM EBCDIC - International (500 + Euro symbol)
1149IBM EBCDIC - Icelandic (20871 + Euro symbol)
1200Unicode UCS-2 Little-Endian (BMP of ISO 10646)
1201Unicode UCS-2 Big-Endian
1250ANSI - Central European
1251ANSI - Cyrillic
1252ANSI - Latin I
1253ANSI - Greek
1254ANSI - Turkish
1255ANSI - Hebrew
1256ANSI - Arabic
1257ANSI - Baltic
1258ANSI/OEM - Vietnamese
1361Korean (Johab)
10000MAC - Roman
10001MAC - Japanese
10002MAC - Traditional Chinese (Big5)
10003MAC - Korean
10004MAC - Arabic
10005MAC - Hebrew
10006MAC - Greek I
10007MAC - Cyrillic
10008MAC - Simplified Chinese (GB 2312)
10010MAC - Romania
10017MAC - Ukraine
10021MAC - Thai
10029MAC - Latin II
10079MAC - Icelandic
10081MAC - Turkish
10082MAC - Croatia
12000Unicode UCS-4 Little-Endian
12001Unicode UCS-4 Big-Endian
20000CNS - Taiwan
20001TCA - Taiwan
20002Eten - Taiwan
20003IBM5550 - Taiwan
20004TeleText - Taiwan
20005Wang - Taiwan
20105IA5 IRV International Alphabet No. 5 (7-bit)
20106IA5 German (7-bit)
20107IA5 Swedish (7-bit)
20108IA5 Norwegian (7-bit)
20127US-ASCII (7-bit)
20261T.61
20269ISO 6937 Non-Spacing Accent
20273IBM EBCDIC - Germany
20277IBM EBCDIC - Denmark/Norway
20278IBM EBCDIC - Finland/Sweden
20280IBM EBCDIC - Italy
20284IBM EBCDIC - Latin America/Spain
20285IBM EBCDIC - United Kingdom
20290IBM EBCDIC - Japanese Katakana Extended
20297IBM EBCDIC - France
20420IBM EBCDIC - Arabic
20423IBM EBCDIC - Greek
20424IBM EBCDIC - Hebrew
20833IBM EBCDIC - Korean Extended
20838IBM EBCDIC - Thai
20866Russian - KOI8-R
20871IBM EBCDIC - Icelandic
20880IBM EBCDIC - Cyrillic (Russian)
20905IBM EBCDIC - Turkish
20924IBM EBCDIC - Latin-1/Open System (1047 + Euro symbol)
20932JIS X 0208-1990 & 0121-1990
20936Simplified Chinese (GB2312)
21025IBM EBCDIC - Cyrillic (Serbian, Bulgarian)
21027Extended Alpha Lowercase
21866Ukrainian (KOI8-U)
28591ISO 8859-1 Latin I
28592ISO 8859-2 Central Europe
28593ISO 8859-3 Latin 3
28594ISO 8859-4 Baltic
28595ISO 8859-5 Cyrillic
28596ISO 8859-6 Arabic
28597ISO 8859-7 Greek
28598ISO 8859-8 Hebrew
28599ISO 8859-9 Latin 5
28605ISO 8859-15 Latin 9
29001Europa 3
38598ISO 8859-8 Hebrew
50220ISO 2022 Japanese with no halfwidth Katakana
50221ISO 2022 Japanese with halfwidth Katakana
50222ISO 2022 Japanese JIS X 0201-1989
50225ISO 2022 Korean
50227ISO 2022 Simplified Chinese
50229ISO 2022 Traditional Chinese
50930Japanese (Katakana) Extended
50931US/Canada and Japanese
50933Korean Extended and Korean
50935Simplified Chinese Extended and Simplified Chinese
50936Simplified Chinese
50937US/Canada and Traditional Chinese
50939Japanese (Latin) Extended and Japanese
51932EUC - Japanese
51936EUC - Simplified Chinese
51949EUC - Korean
51950EUC - Traditional Chinese
52936HZ-GB2312 Simplified Chinese
54936Windows XP: GB18030 Simplified Chinese (4 Byte)
57002ISCII Devanagari
57003ISCII Bengali
57004ISCII Tamil
57005ISCII Telugu
57006ISCII Assamese
57007ISCII Oriya
57008ISCII Kannada
57009ISCII Malayalam
57010ISCII Gujarati
57011ISCII Punjabi
65000Unicode UTF-7
65001Unicode UTF-8
The following is a list of valid code page identifiers for Mac OS only:
IdentifierName
1ASCII
2NEXTSTEP
3JapaneseEUC
4UTF8
5ISOLatin1
6Symbol
7NonLossyASCII
8ShiftJIS
9ISOLatin2
10Unicode
11WindowsCP1251
12WindowsCP1252
13WindowsCP1253
14WindowsCP1254
15WindowsCP1250
21ISO2022JP
30MacOSRoman
10UTF16String
0x90000100UTF16BigEndian
0x94000100UTF16LittleEndian
0x8c000100UTF32String
0x98000100UTF32BigEndian
0x9c000100UTF32LittleEndian
65536Proprietary

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:

  • Product: The product the license is for.
  • Product Key: The key the license was generated from.
  • License Source: Where the license was found (e.g., RuntimeLicense, License File).
  • License Type: The type of license installed (e.g., Royalty Free, Single Server).
  • Last Valid Build: The last valid build number for which the license will work.
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 true.

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.