Get-CloudStorage Cmdlet

Parameters   Output Objects   Config Settings  

The Get-CloudStorage component is used to download files and retrieve directory listings from Cloud Storage providers.

Syntax

Get-CloudStorage [parameters]

Remarks

To list a directory, set the List parameter to the remote path of the target directory. Passing "/" as the List parameter will list the root directory of the remote host.

To download files or entire directories, set the RemoteFile parameter to the name of the target file or directory. Wildcards (*) can be used to download multiple files. When downloading multiple files or a directory, the LocalFile parameter must be set to the local directory where the target files/directory should be stored. When downloading a single file, the LocalFile parameter must be set to the local path and file name to the file where the downloaded content will be stored. If the local file already exists, the Overwrite switch must be passed to overwrite the local file.

The following providers use OAuth 2.0 for authentication:

  • Box.com
  • DropBox
  • Google Drive
  • Google Cloud Storage*
  • Microsoft OneDrive

For each of these providers, OAuthClientId and OAuthClientSecret are required to generate the OAuth token. The cmdlet will automatically fetch and cache OAuth tokens, which requires user-interaction the first time.

Once the token has been cached the cmdlet will automatically use and refresh this token without additional interaction. The OAuthCacheDir parameter governs the location of the OAuth cache files, and passing the empty string to this parameter will disable OAuth caching entirely.

To authenticate with the remaining providers, use the parameters shown in the table below:

Provider Relevant Parameters
Amazon S3 AccessKey and SecretKey
Azure Blob Account and AccessKey
Azure File Account and AccessKey
Digital Ocean Spaces AccessKey and SecretKey
Google Cloud Storage* ProjectId (if using OAuthClientId and OAuthClientSecret for OAuth); or, AccessKey and SecretKey
Hadoop DFS Multiple HTTP authentication schemes are supported; refer to AuthMechanism for more information. HadoopURL must always be set.
Wasabi AccessKey and SecretKey

*Google Cloud Storage supports two authentication methods. To authenticate with OAuth 2.0 (preferred) set the OAuthClientId, OAuthClientSecret, and ProjectId parameters. To authenticate with an access and secret key, set the AccessKey and SecretKey parameters instead.

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.

#list all buckets (the root directory) for Amazon S3 Get-CloudStorage -ServiceProvider Amazons3 -AccessKey $accesskey -SecretKey $secretkey -List "/" #download all text files from a subfolder of Box Get-CloudStorage -ServiceProvider Box -OAuthClientId $boxid -OAuthClientSecret $boxsecret -RemoteFile "test/*.txt" -LocalFile "C:/test" #download a single file from Wasabi Get-CloudStorage -ServiceProvider Wasabi -AccessKey $accesskey -SecretKey $secretkey -RemoteFile "Apple.txt" -LocalFile "C:/test/downloaded_apple.txt" #download an entire directory from DropBox Get-CloudStorage -ServiceProvider DropBox -OAuthClientId $dropboxid -OAuthClientSecret $dropboxsecret -RemoteFile "folder/subfolder" -LocalFile "C:/test"

Connection Handling

This cmdlet supports persistent connections through the Connection parameter. To establish a new CloudStorage connection, use the Connect-CloudStorage cmdlet. To close the connection, use the Disconnect-CloudStorage 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.
AccessKeyA storage service provider access key.
AccountA storage service provider account string.
AuthMechanismThe HTTP authentication scheme to use (for storage service providers that support multiple).
CertPasswordThe password to the certificate store.
CertStoreThe name of the certificate store for the client certificate.
CertStoreTypeThe type of certificate store for the client certificate.
CertSubjectThe subject of the certificate used for client authentication.
ConfigSpecifies one or more configuration settings.
CredentialThe PSCredential object to use for user/password authentication.
EncryptionAlgorithmThe encryption algorithm.
EncryptionPasswordThe encryption password.
ForceForces the component to accept the default behavior instead of querying the user.
HadoopURLThe URL of the Hadoop WebHDFS server.
ListGet a directory listing for the path and file mask specified.
LocalFileThe local file to download to.
LogFileThe location of a file to which debug information is written.
OAuthCacheDirThe directory where OAuth settings will be stored.
OAuthClientIdAccount credential for services that require OAuth authentication.
OAuthClientSecretAccount credential for services that require OAuth authentication.
OAuthWebServerPortThe port on the local machine where the OAuth web server will listen.
OverwriteIndicates whether the LocalFile may be overwritten.
PasswordA storage service provider password.
ProjectIdA Google Cloud Platform project Id string.
RemoteFileThe name of the remote file(s)/directory to download.
RemotePathThe path on the server.
SecretKeyA storage service provider access key.
ServiceProviderThe storage service provider.
TimeoutThe maximum time allowed for the operation.
UserA storage service provider user name.

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 Cloud Storage provider.

Config Settings


The following is a list of config settings for the cmdlet with short descriptions. Click on the links for further details.

AWSProfileThe name of the AWS CLI profile that the component should use to obtain authentication and region information.
AWSProfileDirThe location of the AWS CLI credentials and config files.
ContentDispositionThe Content-Disposition to send when uploading an file to an S3-like storage provider.
ContentTypeThe Content-Type to send when uploading an file to an S3-like storage provider.
DateFormatThe date format of the file time.
DocsExportFormatThe file format to export Google Docs files as when downloading.
DrawingsExportFormatThe file format to export Google Drawings files as when downloading.
EncryptionIVThe initialization vector to be used for encryption/decryption.
EncryptionKeyThe key to use during encryption/decryption.
EncryptionPasswordKDFThe KDF algorithm to use during password based encryption and decryption.
FragmentSizeThe fragment size that the component should use when uploading files in multiple fragments.
ListResourcesScopeControls the scope of the results when listing GoogleDrive resources.
NewVersionOnOverwriteWhether to upload new file versions instead of performing true overwrites.
NormalizedFileName[i]The normalized file name.
RegionFor applicable providers, specifies the region to use.
SharedDriveIdThe Id of the Google Drive shared drive to list resources for.
SheetsExportFormatThe file format to export Google Sheets files as when downloading.
SimpleUploadLimitThe threshold above which the component will choose to perform a multipart upload, for applicable storage service providers.
SlidesExportFormatThe file format to export Google Slides files as when downloading.
UseVirtualHostingDetermines which URL style S3-like storage service providers should use.
AcceptEncodingUsed to tell the server which types of content encodings the client supports.
AllowHTTPCompressionThis property enables HTTP compression for receiving data.
AllowHTTPFallbackWhether HTTP/2 connections are permitted to fallback to HTTP/1.1.
AppendWhether to append data to LocalFile.
AuthorizationThe Authorization string to be sent to the server.
BytesTransferredContains the number of bytes transferred in the response data.
ChunkSizeSpecifies the chunk size in bytes when using chunked encoding.
CompressHTTPRequestSet to true to compress the body of a PUT or POST request.
EncodeURLIf set to True the URL will be encoded by the component.
FollowRedirectsDetermines what happens when the server issues a redirect.
GetOn302RedirectIf set to True the component will perform a GET on the new location.
HTTP2HeadersWithoutIndexingHTTP2 headers that should not update the dynamic header table with incremental indexing.
HTTPVersionThe version of HTTP used by the component.
IfModifiedSinceA date determining the maximum age of the desired document.
KeepAliveDetermines whether the HTTP connection is closed after completion of the request.
KerberosSPNThe Service Principal Name for the Kerberos Domain Controller.
LogLevelThe level of detail that is logged.
MaxRedirectAttemptsLimits the number of redirects that are followed in a request.
NegotiatedHTTPVersionThe negotiated HTTP version.
OtherHeadersOther headers as determined by the user (optional).
ProxyAuthorizationThe authorization string to be sent to the proxy server.
ProxyAuthSchemeThe authorization scheme to be used for the proxy.
ProxyPasswordA password if authentication is to be used for the proxy.
ProxyPortPort for the proxy server (default 80).
ProxyServerName or IP address of a proxy server (optional).
ProxyUserA user name if authentication is to be used for the proxy.
SentHeadersThe full set of headers as sent by the client.
StatusCodeThe status code of the last response from the server.
StatusLineThe first line of the last response from the server.
TransferredDataThe contents of the last response from the server.
TransferredDataLimitThe maximum number of incoming bytes to be stored by the component.
TransferredHeadersThe full set of headers as received from the server.
TransferredRequestThe full request as sent by the client.
UseChunkedEncodingEnables or Disables HTTP chunked encoding for transfers.
UseIDNsWhether to encode hostnames to internationalized domain names.
UseProxyAutoConfigURLWhether to use a Proxy auto-config file when attempting a connection.
UserAgentInformation about the user agent (browser).
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-CloudStorage Cmdlet)

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

Syntax

Get-CloudStorage -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-CloudStorage Cmdlet)

An existing CloudStorage connection.

Syntax

Get-CloudStorage -Connection CloudStorageConnection

Remarks

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

Default Value

null

AccessKey Property (Get-CloudStorage Cmdlet)

A storage service provider access key.

Syntax

Get-CloudStorage -AccessKey string

Remarks

This property specifies the access key to use for authentication. It must be populated when using one of these storage service providers:

Default Value

""

Account Property (Get-CloudStorage Cmdlet)

A storage service provider account string.

Syntax

Get-CloudStorage -Account string

Remarks

This property specifies the account string to use for authentication. It must be populated when using one of these storage service providers:

  • AzureBlob
  • AzureFile

Default Value

""

AuthMechanism Property (Get-CloudStorage Cmdlet)

The HTTP authentication scheme to use (for storage service providers that support multiple).

Syntax

Get-CloudStorage -AuthMechanism string

Remarks

For storage service providers that support more than one HTTP authentication scheme, this property specifies which should be used. This property is only relevant for the following storage service providers:

  • HadoopDFS
(For all other storage service providers, the cmdlet determines the correct authentication scheme automatically).

Usage

Possible values for this property are:

None (default) No authentication is performed.
Simple Hadoop pseudo/simple authentication is performed.
Basic Basic authentication is performed.
NTLM NTLM authentication is performed.
Negotiate Negotiate authentication is performed.

When set to Simple, the value of the User property is automatically sent in every request using the user.name query parameter. (Note: This authentication scheme is only valid for the HadoopDFS storage service provider.)

When set to Basic, NTLM, or Negotiate, the values held by the User and Password properties will be used to perform Basic, NTLM, or Negotiate authentication.

Default Value

0

CertPassword Property (Get-CloudStorage Cmdlet)

The password to the certificate store.

Syntax

Get-CloudStorage -CertPassword string

Remarks

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

Default Value

""

Parameter Alias

CertificatePassword

CertStore Property (Get-CloudStorage Cmdlet)

The name of the certificate store for the client certificate.

Syntax

Get-CloudStorage -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-CloudStorage Cmdlet)

The type of certificate store for the client certificate.

Syntax

Get-CloudStorage -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-CloudStorage Cmdlet)

The subject of the certificate used for client authentication.

Syntax

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

"*"

Config Property (Get-CloudStorage Cmdlet)

Specifies one or more configuration settings.

Syntax

Get-CloudStorage -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-CloudStorage Cmdlet)

The PSCredential object to use for user/password authentication.

Syntax

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

EncryptionAlgorithm Property (Get-CloudStorage Cmdlet)

The encryption algorithm.

Syntax

Get-CloudStorage -EncryptionAlgorithm string

Remarks

This property specifies the encryption algorithm to be used. The maximum allowable key size is automatically used for the selected algorithm. Possible values are:

Algorithm Key Size
0 (eaAES - default) 256
1 (eaBlowfish) 448
2 (eaCAST) 128
3 (eaDES) 64
4 (eaIDEA) 128
5 (eaRC2) 128
6 (eaRC4) 2048
7 (eaTEA) 128
8 (eaTripleDES) 192
9 (eaTwofish) 256
10 (eaRijndael) 256
11 (eaChaCha) 256
12 (eaXSalsa20) 256

Default Value

0

EncryptionPassword Property (Get-CloudStorage Cmdlet)

The encryption password.

Syntax

Get-CloudStorage -EncryptionPassword string

Remarks

When this property is specified the cmdlet will attempt to decrypt the file when downloading. For decryption to succeed, the password must match the password used to encrypt the file and the EncryptionAlgorithm must be the same algorithm that was used during encryption. The cmdlet uses the value specified here to generate the necessary encryption Key and IV values using the PKCS5 password digest algorithm.

Default Value

""

Force Property (Get-CloudStorage Cmdlet)

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

Syntax

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

HadoopURL Property (Get-CloudStorage Cmdlet)

The URL of the Hadoop WebHDFS server.

Syntax

Get-CloudStorage -HadoopURL string

Remarks

This property specifies the URL of the Hadoop WebHDFS server to make requests against. It must be set when ServiceProvider is set to HadoopDFS.

A full WebHDFS URL looks like http[s]://<HOST>:<PORT>/webhdfs/v1. The cmdlet will automatically append /webhdfs/v1 when making requests (if necessary).

The cmdlet automatically detects whether to secure the connection using SSL/TLS based on whether the value begins with http (not secured) or https (secured).

Default Value

""

List Property (Get-CloudStorage Cmdlet)

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

Syntax

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

For instance: #list all buckets (the root directory) for Amazon S3 Get-CloudStorage -ServiceProvider Amazons3 -AccessKey $accesskey -SecretKey $secretkey -List "/"

Default Value

""

Parameter Alias

Path

LocalFile Property (Get-CloudStorage Cmdlet)

The local file to download to.

Syntax

Get-CloudStorage -LocalFile string

Remarks

LocalFile contains the full path and filename on your machine that the RemoteFile will be saved to. If RemoteFile specifies multiple files or a directory, LocalFile must be set to a local directory.

Default Value

""

LogFile Property (Get-CloudStorage Cmdlet)

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

Syntax

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

""

OAuthCacheDir Property (Get-CloudStorage Cmdlet)

The directory where OAuth settings will be stored.

Syntax

Get-CloudStorage -OAuthCacheDir string

Remarks

If OAuth settings are cached, user-interaction is only necessary for the first connection, after which the OAuth credentials will be automatically updated when required. To disable caching, set this value to empty string.

Default Value

"%APPDATA%/nsoftware/NetCmdlets/OAuth/"

OAuthClientId Property (Get-CloudStorage Cmdlet)

Account credential for services that require OAuth authentication.

Syntax

Get-CloudStorage -OAuthClientId string

Remarks

This property is required when using the following providers: Box, DropBox, OneDrive, and GoogleDrive.

Default Value

""

OAuthClientSecret Property (Get-CloudStorage Cmdlet)

Account credential for services that require OAuth authentication.

Syntax

Get-CloudStorage -OAuthClientSecret string

Remarks

This property is required when using the following providers: Box, DropBox, OneDrive, and GoogleDrive.

Default Value

""

OAuthWebServerPort Property (Get-CloudStorage Cmdlet)

The port on the local machine where the OAuth web server will listen.

Syntax

Get-CloudStorage -OAuthWebServerPort int

Remarks

During the OAuth process, the OAuth server will redirect to a given URI. This cmdlet hosts an internal web server on the local machine to listen for this redirection. The redirect URI must be registered with the application when OAuth is configured, and this parameter can be used to make sure the port of the web server matches the port registered with the application.

Default Value

0

Parameter Alias

RedirectPort

Overwrite Property (Get-CloudStorage Cmdlet)

Indicates whether the LocalFile may be overwritten.

Syntax

Get-CloudStorage -Overwrite SwitchParameter

Remarks

If the LocalFile exists on the machine, Overwrite must be passed for the download to succeed.

Default Value

false

Password Property (Get-CloudStorage Cmdlet)

A storage service provider password.

Syntax

Get-CloudStorage -Password string

Remarks

This property specifies the password to use for authentication. It must be populated when using one of these storage service providers:

Default Value

""

ProjectId Property (Get-CloudStorage Cmdlet)

A Google Cloud Platform project Id string.

Syntax

Get-CloudStorage -ProjectId string

Remarks

This property specifies the Google Cloud Platform project Id string to use for authentication. It must be set when using OAuth 2.0 authentication (i.e., the OAuthClientId and OAuthClientSecret properties are populated) with one of these storage service providers:

  • GoogleStorage

Note that the above providers will fall back to using an AccessKey and SecretKey for authentication if this property or either of the OAuthClientId or OAuthClientSecret properties is empty.

Default Value

""

RemoteFile Property (Get-CloudStorage Cmdlet)

The name of the remote file(s)/directory to download.

Syntax

Get-CloudStorage -RemoteFile string

Remarks

The RemoteFile is either an absolute file path, or a relative path based on the home path set by the server. If a filemask is provided, all files matching the mask will be downloaded, and if a directory is specified, the directory will be downloaded.

For instance: #download all text files from a subfolder of Box Get-CloudStorage -ServiceProvider Box -OAuthClientId $boxid -OAuthClientSecret $boxsecret -RemoteFile "test/*.txt" -LocalFile "C:/test" #download a single file from Wasabi Get-CloudStorage -ServiceProvider Wasabi -AccessKey $accesskey -SecretKey $secretkey -RemoteFile "Apple.txt" -LocalFile "C:/test/downloaded_apple.txt" #download an entire directory from DropBox Get-CloudStorage -ServiceProvider DropBox -OAuthClientId $dropboxid -OAuthClientSecret $dropboxsecret -RemoteFile "folder/subfolder" -LocalFile "C:/test"

Default Value

""

Parameter Position

1

Parameter Alias

Download

RemotePath Property (Get-CloudStorage Cmdlet)

The path on the server.

Syntax

Get-CloudStorage -RemotePath string

Remarks

If specified, this parameter will be combined with RemoteFile to determine the location of the file(s) on the server. Alternatively, the full path and file name can be specified in RemoteFile.

Default Value

""

SecretKey Property (Get-CloudStorage Cmdlet)

A storage service provider access key.

Syntax

Get-CloudStorage -SecretKey string

Remarks

This property specifies the access key to use for authentication. It must be populated when using one of these storage service providers:

Default Value

""

ServiceProvider Property (Get-CloudStorage Cmdlet)

The storage service provider.

Syntax

Get-CloudStorage -ServiceProvider string

Remarks

This property specifies the storage service provider which will be used. Possible values are:

  • AmazonS3 (default): Amazon S3
  • Box: Box.com
  • Dropbox: Dropbox
  • GoogleDrive: Google Drive
  • OneDrive: Microsoft OneDrive
  • AzureBlob: Azure Blob
  • Wasabi: Wasabi
  • DigitalOcean: Digital Ocean Spaces
  • GoogleStorage: Google Cloud Storage
  • HadoopDFS: Hadoop DFS
  • AzureFile: Azure File

Default Value

0

Parameter Alias

Provider

Timeout Property (Get-CloudStorage Cmdlet)

The maximum time allowed for the operation.

Syntax

Get-CloudStorage -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-CloudStorage Cmdlet)

A storage service provider user name.

Syntax

Get-CloudStorage -User string

Remarks

This property specifies the user name to use for authentication. It must be populated when using one of these storage service providers:

Default Value

""

EntryInfo Output Object (Get-CloudStorage Cmdlet)

This object contains details about a file returned from the Cloud Storage provider.

Syntax

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

Remarks

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

Config Settings (Get-CloudStorage 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-CloudStorage Config Settings

AWSProfile:   The name of the AWS CLI profile that the cmdlet should use to obtain authentication and region information.

This setting, if non-empty, must contain the name of the AWS CLI profile whose authentication and (optionally) region information the cmdlet should use to communicate with the server. To use the default profile, set this setting to default. Refer to the following pages of the AWS CLI documentation for more information about AWS profiles, and the credentials and config files used to store them:

The cmdlet supports key-based credential profiles; i.e., those which include the aws_access_key_id, aws_secret_access_key, and (optionally) aws_session_token elements. Role-based profiles are not supported at this time.

In addition to the authentication-related elements mentioned above, the cmdlet also supports the region element, if it is present in the specified profile.

The cmdlet searches for the specified profile's information in the credentials and config files. The AWSProfileDir setting can be used to configure the directory where the cmdlet looks for these files. If the aforementioned files do not exist, or the specified profile cannot be found or is missing information, an error will occur.

Note: This setting is applicable only when ServiceProvider is set to one of the following:

  • cspAmazonS3 (0)
  • cspWasabi (7)
  • cspDigitalOcean (8)
  • cspGoogleStorage (9)
  • cspIBMStorage (13)
  • cspLinode (14)

AWSProfileDir:   The location of the AWS CLI credentials and config files.

This setting specifies the directory that the cmdlet should check when attempting to locate the AWS CLI credentials and config files. This setting is only used if the AWSProfile setting is non-empty.

By default, this setting is empty, which will cause the cmdlet to check the default location used by the AWS CLI: an .aws directory in the current user's home directory; i.e., %UserProfile%\.aws (Windows) or ~/.aws (Linux/macOS).

Note: This setting is applicable only when ServiceProvider is set to one of the following:

  • cspAmazonS3 (0)
  • cspWasabi (7)
  • cspDigitalOcean (8)
  • cspGoogleStorage (9)
  • cspIBMStorage (13)
  • cspLinode (14)

ContentDisposition:   The Content-Disposition to send when uploading an file to an S3-like storage provider.

This setting specifies the value that should be sent for the Content-Disposition header when uploading a file.

Note: This setting is applicable only when ServiceProvider is set to one of the following:

  • cspAmazonS3 (0)
  • cspWasabi (7)
  • cspDigitalOcean (8)
  • cspGoogleStorage (9)
  • cspIBMStorage (13)
  • cspLinode (14)

ContentType:   The Content-Type to send when uploading an file to an S3-like storage provider.

This setting specifies the value that should be sent for the Content-Type header when uploading a file.

Note: This setting is applicable only when ServiceProvider is set to one of the following:

  • cspAmazonS3 (0)
  • cspWasabi (7)
  • cspDigitalOcean (8)
  • cspGoogleStorage (9)
  • cspIBMStorage (13)
  • cspLinode (14)

DateFormat:   The date format of the file time.

This setting specifies the format of the datetime used when reporting the file's modified date. The default value is "yyyy-MM-dd'T'HH:mm:ss" and the server time will be localized.

If this setting is set to empty string the exact value sent by the server will be returned.

DocsExportFormat:   The file format to export Google Docs files as when downloading.

This setting specifies what file format to export Google Docs as when downloading; it takes a file extension, which will be applied to the downloaded filename if necessary. Valid values (and their associated MIME types) are:

  • docx (default) - application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • epub - application/epub+zip
  • htm or html - text/html
  • odt - application/vnd.oasis.opendocument.text
  • pdf - application/pdf
  • rtf - application/rtf
  • txt - text/plain
  • zip - application/zip
You may also specify a string like [extension],[MIME type] instead of one of the file extensions above if you wish to customize the MIME type to export the file as and/or the file extension to apply to the downloaded file.

Note that this configuration setting is only valid when the ServiceProvider property is set to cspGoogleDrive (3).

DrawingsExportFormat:   The file format to export Google Drawings files as when downloading.

This setting specifies what file format to export Google Drawings as when downloading; it takes a file extension, which will be applied to the downloaded filename if necessary. Valid values (and their associated MIME types) are:

  • jpg or jpeg - image/jpeg
  • pdf - application/pdf
  • png (default) - image/png
  • svg - image/svg+xml
You may also specify a string like [extension],[MIME type] instead of one of the file extensions above if you wish to customize the MIME type to export the file as and/or the file extension to apply to the downloaded file.

Note that this configuration setting is only valid when the ServiceProvider property is set to cspGoogleDrive (3).

EncryptionIV:   The initialization vector to be used for encryption/decryption.

When encrypting or decrypting a file, this setting may be set to specify the initialization vector. Normally the cmdlet will derive this value automatically from EncryptionPassword.

This setting accepts a hex encoded value.

EncryptionKey:   The key to use during encryption/decryption.

When encrypting or decrypting a file, this setting may be set to specify the key to use. Normally the cmdlet will derive this value automatically from EncryptionPassword.

This setting accepts a hex encoded value.

EncryptionPasswordKDF:   The KDF algorithm to use during password based encryption and decryption.

This setting specified the Key Derivation Function (KDF) used to derive a key from the specified EncryptionPassword. Possible values are:

  • 0 (default) - PBKDF1
  • 1 - PBKDF2
Note: PBKDF1 is not FIPS compliant. When operating in FIPS mode PBKDF2 should be used.

FragmentSize:   The fragment size that the cmdlet should use when uploading files in multiple fragments.

The cmdlet will sometimes choose to upload files in multiple fragments, depending on the size of the file, and whether the currently-selected ServiceProvider's API includes native support for resumable uploads. In such cases, this setting specifies the fragment size, in bytes, that the cmdlet should use.

This setting's default and minimum values vary by ServiceProvider; its maximum value is 2147483647 (2GB). Refer to the configuration settings documentation for each individual storage service provider cmdlet for more information.

Note that this setting cannot be changed when ServiceProvider is set to one of the following:

  • cspBox (1)
  • cspAzureFile (11)

ListResourcesScope:   Controls the scope of the results when listing GoogleDrive resources.

When the ServiceProvider property is set to cspGoogleDrive (3), this setting controls the scope of the results when listing resources. Possible values are:

0 - User (default) Items in the user's "My Drive" and "Shared with me" collections.
1 - Domain Items shared to the users domain.
2 - Shared Drive Items within the shared drive specified by the SharedDriveId configuration setting.
3 - All Drives Items in the user's "My Drive" and "Shared with me" collections, as well as all items in all shared drives that the user is a member of.
NewVersionOnOverwrite:   Whether to upload new file versions instead of performing true overwrites.

When the Overwrite property is enabled, and the Upload method is called, the cmdlet will normally perform a true overwrite if the destination file already exists (i.e., it will delete the old file before uploading the new one). For service providers that support it, this setting can be enabled to have the cmdlet simply upload a new file version instead of doing a true overwrite.

By default, this setting is disabled. It is only applicable when the ServiceProvider property is set to one of the following:

  • cspBox (1)

NormalizedFileName[i]:   The normalized file name.

When using Google Drive as your service provider, any Google Apps files (Docs, Slides, Sheets, etc) are exported to the file formats specified by the *ExportFormat configuration settings when you call Download. After calling ListDirectory, you can query this configuration setting to get the normalized filename for any entry in DirList; for example:

cloudfiles1.RemotePath = "folder1/folder2/"; cloudfiles1.ListDirectory(); for (int i = 0; i < cloudfiles1.DirList.Count; i++) { CFDirEntry entry = cloudfiles1.DirList[i]; cloudfiles1.RemoteFile = entry.FileName; cloudfiles1.LocalFile = "C:\\Test\\" + cloudfiles1.Config("NormalizedFileName[" + i + "]"); cloudfiles1.Download(); }

For Google Apps files, the normalized file name is the name of the file, plus the appropriate extension (if not already present) based on which export formats were set when ListDirectory was last called. For other files, the normalized file name is the same as the file name reported in the DirList entry.

If you change one of the *ExportFormat configuration settings, you'll need to call ListDirectory again to refresh the values returned by this setting.

Note that this configuration setting is only valid when the ServiceProvider property is set to cspGoogleDrive (3).

Region:   For applicable providers, specifies the region to use.

This setting specifies the region to use, and is applicable when ServiceProvider is set to one of the following:

  • cspAmazonS3 (0) - Refer to the AMAZONS3 cmdlet's Region property for more information.
  • cspWasabi (7) - Refer to the WASABI cmdlet's Region property for more information.
  • cspDigitalOcean (8) - Refer to the DIGITALOCEAN cmdlet's Region property for more information.
  • cspGoogleStorage (9) - Refer to the GOOGLESTORAGE cmdlet's Region property for more information.
  • cspIBMStorage (13) - Refer to the IBMSTORAGE cmdlet's Region property for more information.
  • cspLinode (14) - Refer to the LINODE cmdlet's Region property for more information.
SharedDriveId:   The Id of the Google Drive shared drive to list resources for.

When the ServiceProvider property is set to cspGoogleDrive (3), and the ListResourcesScope setting is set to 2 (Shared Drive), this setting must be set to the Id of a shared drive before attempting to list resources.

SheetsExportFormat:   The file format to export Google Sheets files as when downloading.

This setting specifies what file format to export Google Sheets as when downloading; it takes a file extension, which will be applied to the downloaded filename if necessary. Valid values (and their associated MIME types) are:

  • csv - text/csv
  • ods - application/vnd.oasis.opendocument.spreadsheet
  • pdf - application/pdf
  • tsv - text/tab-separated-values
  • xlsx (default) - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  • zip - application/zip
You may also specify a string like [extension],[MIME type] instead of one of the file extensions above if you wish to customize the MIME type to export the file as and/or the file extension to apply to the downloaded file.

Note that this configuration setting is only valid when the ServiceProvider property is set to cspGoogleDrive (3).

SimpleUploadLimit:   The threshold above which the cmdlet will choose to perform a multipart upload, for applicable storage service providers.

This setting specifies the threshold, in bytes, above which the cmdlet will choose to perform a multipart upload rather than uploading everything in one request. It is only applicable when ServiceProvider is set to one of the following:

  • cspAmazonS3 (0)
  • cspAzureBlob (6)
  • cspWasabi (7)
  • cspDigitalOcean (8)
  • cspBackblazeB2 (12)
  • cspIBMStorage (13)
  • cspLinode (14)

For all other providers, the limit is either defined by the server, or the service's API includes native support for resumable uploads.

SlidesExportFormat:   The file format to export Google Slides files as when downloading.

This setting specifies what file format to export Google Slides as when downloading; it takes a file extension, which will be applied to the downloaded filename if necessary. Valid values (and their associated MIME types) are:

  • odp - application/vnd.oasis.opendocument.presentation
  • pdf - application/pdf
  • pptx (default) - application/vnd.openxmlformats-officedocument.presentationml.presentation
  • txt - text/plain
You may also specify a string like [extension],[MIME type] instead of one of the file extensions above if you wish to customize the MIME type to export the file as and/or the file extension to apply to the downloaded file.

Note that this configuration setting is only valid when the ServiceProvider property is set to cspGoogleDrive (3).

UseVirtualHosting:   Determines which URL style S3-like storage service providers should use.

This setting determines whether S3-like storage service providers should use path-style or hosted-style URLs when making requests. It is applicable only when ServiceProvider is set to one of the following:

  • cspAmazonS3 (0) - Defaults to true; refer to the AMAZONS3 cmdlet's UseVirtualHosting property for more information.
  • cspWasabi (7) - Defaults to false; refer to the WASABI cmdlet's UseVirtualHosting property for more information.
  • cspDigitalOcean (8) - Defaults to false; refer to the DIGITALOCEAN cmdlet's UseVirtualHosting property for more information.
  • cspGoogleStorage (9) - Defaults to false; refer to the GOOGLESTORAGE cmdlet's UseVirtualHosting property for more information.
  • cspIBMStorage (13) - Defaults to true; refer to the IBMSTORAGE cmdlet's UseVirtualHosting property for more information.
  • cspLinode (14) - Defaults to true; refer to the LINODE cmdlet's UseVirtualHosting property for more information.

HTTP Config Settings

AcceptEncoding:   Used to tell the server which types of content encodings the client supports.

When AllowHTTPCompression is True, the cmdlet adds an Accept-Encoding header to the request being sent to the server. By default, this header's value is "gzip, deflate". This configuration setting allows you to change the value of the Accept-Encoding header. Note: The cmdlet only supports gzip and deflate decompression algorithms.

AllowHTTPCompression:   This property enables HTTP compression for receiving data.

This configuration setting enables HTTP compression for receiving data. When set to True (default), the cmdlet will accept compressed data. It then will uncompress the data it has received. The cmdlet will handle data compressed by both gzip and deflate compression algorithms.

When True, the cmdlet adds an Accept-Encoding header to the outgoing request. The value for this header can be controlled by the AcceptEncoding configuration setting. The default value for this header is "gzip, deflate".

The default value is True.

AllowHTTPFallback:   Whether HTTP/2 connections are permitted to fallback to HTTP/1.1.

This configuration setting controls whether HTTP/2 connections are permitted to fall back to HTTP/1.1 when the server does not support HTTP/2. This setting is applicable only when HTTPVersion is set to "2.0".

If set to True (default), the cmdlet will automatically use HTTP/1.1 if the server does not support HTTP/2. If set to False, the cmdlet throws an exception if the server does not support HTTP/2.

The default value is True.

Append:   Whether to append data to LocalFile.

This configuration setting determines whether data will be appended when writing to LocalFile. When set to True, downloaded data will be appended to LocalFile. This may be used in conjunction with Range to resume a failed download. This is applicable only when LocalFile is set. The default value is False.

Authorization:   The Authorization string to be sent to the server.

If the Authorization property contains a nonempty string, an Authorization HTTP request header is added to the request. This header conveys Authorization information to the server.

This property is provided so that the HTTP cmdlet can be extended with other security schemes in addition to the authorization schemes already implemented by the cmdlet.

The AuthScheme property defines the authentication scheme used. In the case of HTTP Basic Authentication (default), every time User and Password are set, they are Base64 encoded, and the result is put in the Authorization property in the form "Basic [encoded-user-password]".

BytesTransferred:   Contains the number of bytes transferred in the response data.

This configuration setting returns the raw number of bytes from the HTTP response data, before the component processes the data, whether it is chunked or compressed. This returns the same value as the Transfer event, by BytesTransferred.

ChunkSize:   Specifies the chunk size in bytes when using chunked encoding.

This is applicable only when UseChunkedEncoding is True. This setting specifies the chunk size in bytes to be used when posting data. The default value is 16384.

CompressHTTPRequest:   Set to true to compress the body of a PUT or POST request.

If set to True, the body of a PUT or POST request will be compressed into gzip format before sending the request. The "Content-Encoding" header is also added to the outgoing request.

The default value is False.

EncodeURL:   If set to True the URL will be encoded by the cmdlet.

If set to True, the URL passed to the cmdlet will be URL encoded. The default value is False.

FollowRedirects:   Determines what happens when the server issues a redirect.

This option determines what happens when the server issues a redirect. Normally, the cmdlet returns an error if the server responds with an "Object Moved" message. If this property is set to 1 (always), the new URL for the object is retrieved automatically every time.

If this property is set to 2 (Same Scheme), the new URL is retrieved automatically only if the URL Scheme is the same; otherwise, the cmdlet throws an exception.

Note: Following the HTTP specification, unless this option is set to 1 (Always), automatic redirects will be performed only for GET or HEAD requests. Other methods potentially could change the conditions of the initial request and create security vulnerabilities.

Furthermore, if either the new URL server or port are different from the existing one, User and Password are also reset to empty, unless this property is set to 1 (Always), in which case the same credentials are used to connect to the new server.

A Redirect event is fired for every URL the product is redirected to. In the case of automatic redirections, the Redirect event is a good place to set properties related to the new connection (e.g., new authentication parameters).

The default value is 0 (Never). In this case, redirects are never followed, and the cmdlet throws an exception instead.

Following are the valid options:

  • 0 - Never
  • 1 - Always
  • 2 - Same Scheme

GetOn302Redirect:   If set to True the cmdlet will perform a GET on the new location.

The default value is False. If set to True, the cmdlet will perform a GET on the new location. Otherwise, it will use the same HTTP method again.

HTTP2HeadersWithoutIndexing:   HTTP2 headers that should not update the dynamic header table with incremental indexing.

HTTP/2 servers maintain a dynamic table of headers and values seen over the course of a connection. Typically, these headers are inserted into the table through incremental indexing (also known as HPACK, defined in RFC 7541). To tell the component not to use incremental indexing for certain headers, and thus not update the dynamic table, set this configuration option to a comma-delimited list of the header names.

HTTPVersion:   The version of HTTP used by the cmdlet.

This property specifies the HTTP version used by the cmdlet. Possible values are as follows:

  • "1.0"
  • "1.1" (default)
  • "2.0"
  • "3.0"

When using HTTP/2 ("2.0"), additional restrictions apply. Please see the following notes for details.

HTTP/2 Notes

When using HTTP/2, a secure Secure Sockets Layer/Transport Layer Security (TLS/SSL) connection is required. Attempting to use a plaintext URL with HTTP/2 will result in an error.

If the server does not support HTTP/2, the cmdlet will automatically use HTTP/1.1 instead. This is done to provide compatibility without the need for any additional settings. To see which version was used, check NegotiatedHTTPVersion after calling a method. The AllowHTTPFallback setting controls whether this behavior is allowed (default) or disallowed.

HTTP/2 is supported on all versions of Windows. If the Windows version is an earlier version than Windows 8.1/Windows Server 2012 R2, the internal security implementation will be used. If the Windows version is Window 8.1/Windows Server 2012 R2 or later, the system security libraries will be used by default.

HTTP/3 Notes

HTTP/3 is supported only in .NET and Java.

When using HTTP/3, a secure (TLS/SSL) connection is required. Attempting to use a plaintext URL with HTTP/3 will result in an error.

IfModifiedSince:   A date determining the maximum age of the desired document.

If this setting contains a nonempty string, an If-Modified-Since HTTP header is added to the request. The value of this header is used to make the HTTP request conditional: if the requested documented has not been modified since the time specified in the field, a copy of the document will not be returned from the server; instead, a 304 (not modified) response will be returned by the server and the component throws an exception

The format of the date value for IfModifiedSince is detailed in the HTTP specs. For example: Sat, 29 Oct 2017 19:43:31 GMT.

KeepAlive:   Determines whether the HTTP connection is closed after completion of the request.

If true, the component will not send the Connection: Close header. The absence of the Connection header indicates to the server that HTTP persistent connections should be used if supported. Note: Not all servers support persistent connections. If false, the connection will be closed immediately after the server response is received.

The default value for KeepAlive is false.

KerberosSPN:   The Service Principal Name for the Kerberos Domain Controller.

If the Service Principal Name on the Kerberos Domain Controller is not the same as the URL that you are authenticating to, the Service Principal Name should be set here.

LogLevel:   The level of detail that is logged.

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

0 (None) No events are logged.
1 (Info - default) Informational events are logged.
2 (Verbose) Detailed data are logged.
3 (Debug) Debug data are logged.

The value 1 (Info) logs basic information, including the URL, HTTP version, and status details.

The value 2 (Verbose) logs additional information about the request and response.

The value 3 (Debug) logs the headers and body for both the request and response, as well as additional debug information (if any).

MaxRedirectAttempts:   Limits the number of redirects that are followed in a request.

When FollowRedirects is set to any value other than frNever, the cmdlet will follow redirects until this maximum number of redirect attempts are made. The default value is 20.

NegotiatedHTTPVersion:   The negotiated HTTP version.

This configuration setting may be queried after the request is complete to indicate the HTTP version used. When HTTPVersion is set to "2.0" (if the server does not support "2.0"), then the cmdlet will fall back to using "1.1" automatically. This setting will indicate which version was used.

OtherHeaders:   Other headers as determined by the user (optional).

This configuration setting can be set to a string of headers to be appended to the HTTP request headers.

The headers must follow the format "header: value" as described in the HTTP specifications. Header lines should be separated by CRLF ("\r\n") .

Use this configuration setting with caution. If this configuration setting contains invalid headers, HTTP requests may fail.

This configuration setting is useful for extending the functionality of the cmdlet beyond what is provided.

ProxyAuthorization:   The authorization string to be sent to the proxy server.

This is similar to the Authorization configuration setting, but is used for proxy authorization. If this configuration setting contains a nonempty string, a Proxy-Authorization HTTP request header is added to the request. This header conveys proxy Authorization information to the server. If ProxyUser and ProxyPassword are specified, this value is calculated using the algorithm specified by ProxyAuthScheme.

ProxyAuthScheme:   The authorization scheme to be used for the proxy.

This configuration setting is provided for use by cmdlets that do not directly expose Proxy properties.

ProxyPassword:   A password if authentication is to be used for the proxy.

This configuration setting is provided for use by cmdlets that do not directly expose Proxy properties.

ProxyPort:   Port for the proxy server (default 80).

This configuration setting is provided for use by cmdlets that do not directly expose Proxy properties.

ProxyServer:   Name or IP address of a proxy server (optional).

This configuration setting is provided for use by cmdlets that do not directly expose Proxy properties.

ProxyUser:   A user name if authentication is to be used for the proxy.

This configuration setting is provided for use by cmdlets that do not directly expose Proxy properties.

SentHeaders:   The full set of headers as sent by the client.

This configuration setting returns the complete set of raw headers as sent by the client.

StatusCode:   The status code of the last response from the server.

This configuration setting contains the result code of the last response from the server.

StatusLine:   The first line of the last response from the server.

This setting contains the first line of the last response from the server. The format of the line will be [HTTP version] [Result Code] [Description].

TransferredData:   The contents of the last response from the server.

This configuration setting contains the contents of the last response from the server.

TransferredDataLimit:   The maximum number of incoming bytes to be stored by the cmdlet.

If TransferredDataLimit is set to 0 (default), no limits are imposed. Otherwise, this reflects the maximum number of incoming bytes that can be stored by the cmdlet.

TransferredHeaders:   The full set of headers as received from the server.

This configuration setting returns the complete set of raw headers as received from the server.

TransferredRequest:   The full request as sent by the client.

This configuration setting returns the full request as sent by the client. For performance reasons, the request is not normally saved. Set this configuration setting to ON before making a request to enable it. Following are examples of this request:

.NET Http http = new Http(); http.Config("TransferredRequest=on"); http.PostData = "body"; http.Post("http://someserver.com"); Console.WriteLine(http.Config("TransferredRequest")); C++ HTTP http; http.Config("TransferredRequest=on"); http.SetPostData("body", 5); http.Post("http://someserver.com"); printf("%s\r\n", http.Config("TransferredRequest"));

UseChunkedEncoding:   Enables or Disables HTTP chunked encoding for transfers.

If UseChunkedEncoding is set to True, the cmdlet will use HTTP-chunked encoding when posting, if possible. HTTP-chunked encoding allows large files to be sent in chunks instead of all at once. If set to False, the cmdlet will not use HTTP-chunked encoding. The default value is False.

Note: Some servers (such as the ASP.NET Development Server) may not support chunked encoding.

UseIDNs:   Whether to encode hostnames to internationalized domain names.

This configuration setting specifies whether hostnames containing non-ASCII characters are encoded to internationalized domain names. When set to True, if a hostname contains non-ASCII characters, it is encoded using Punycode to an IDN (internationalized domain name).

The default value is False and the hostname will always be used exactly as specified.

UseProxyAutoConfigURL:   Whether to use a Proxy auto-config file when attempting a connection.

This configuration specifies whether the cmdlet will attempt to use the Proxy auto-config URL when establishing a connection and ProxyAutoDetect is set to True.

When True (default), the cmdlet will check for the existence of a Proxy auto-config URL, and if found, will determine the appropriate proxy to use.

UserAgent:   Information about the user agent (browser).

This is the value supplied in the HTTP User-Agent header. The default setting is "IPWorks HTTP Component - www.nsoftware.com".

Override the default with the name and version of your software.

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:   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 configuration 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 dynamic link library (DLL) is no longer required as a reference, as all unmanaged code is stored in that file.