New-FilesRemoteServerCredential

Create Remote Server Credential.

Syntax

New-FilesRemoteServerCredential [-Name <System.String>] [-Description <System.String>] [-ServerType <System.String>] [-AwsAccessKey <System.String>] [-S3AssumeRoleArn <System.String>] [-S3AssumeRoleDurationSeconds <System.Int64>] [-CloudflareAccessKey <System.String>] [-FilebaseAccessKey <System.String>] [-GoogleCloudStorageS3CompatibleAccessKey <System.String>] [-LinodeAccessKey <System.String>] [-S3CompatibleAccessKey <System.String>] [-SharepointClientId <System.String>] [-SharepointTenantId <System.String>] [-Username <System.String>] [-WasabiAccessKey <System.String>] [-Password <System.Security.SecureString>] [-PrivateKey <System.Security.SecureString>] [-PrivateKeyPassphrase <System.Security.SecureString>] [-AwsSecretKey <System.Security.SecureString>] [-AzureBlobStorageAccessKey <System.Security.SecureString>] [-AzureBlobStorageSasToken <System.Security.SecureString>] [-AzureFilesStorageAccessKey <System.Security.SecureString>] [-AzureFilesStorageSasToken <System.Security.SecureString>] [-BackblazeB2ApplicationKey <System.Security.SecureString>] [-BackblazeB2KeyId <System.String>] [-CloudflareSecretKey <System.Security.SecureString>] [-FilebaseSecretKey <System.Security.SecureString>] [-GoogleCloudStorageCredentialsJson <System.Security.SecureString>] [-GoogleCloudStorageS3CompatibleSecretKey <System.Security.SecureString>] [-LinodeSecretKey <System.Security.SecureString>] [-S3CompatibleSecretKey <System.Security.SecureString>] [-SharepointClientCertificate <System.Security.SecureString>] [-SharepointClientSecret <System.Security.SecureString>] [-WasabiSecretKey <System.Security.SecureString>] [-WorkspaceId <System.Int64>] [-CopyValuesFromCredentialId <System.Int64>] [-Connection <FilesCom.PowerShell.FilesConnection>] [-WorkspaceScope <System.Int64>] [-NoWorkspaceScope] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Create Remote Server Credential.

The command supports -WhatIf, which describes the change without sending it to Files.com, and -Confirm, which asks before sending it. It asks for confirmation by default; use -Confirm:$false in scripts that have already decided.

Examples

Example 1: Create Remote Server Credential

New-FilesRemoteServerCredential -Name 'My Credential' -Description 'More information or notes about this credential.'

Writes the remote server credential returned.

Example 2: Preview the change

New-FilesRemoteServerCredential -Name 'My Credential' -Description 'More information or notes about this credential.' -WhatIf

Describes the change without sending anything to Files.com.

Parameters

-Name

Internal name for your reference

  • Type: System.String
  • Parameter sets: (All)

-Description

Internal description for your reference

  • Type: System.String
  • Parameter sets: (All)

-ServerType

Remote server type. Remote Server Credentials are only valid for a single type of Remote Server.

  • Type: System.String
  • Parameter sets: (All)

-AwsAccessKey

AWS Access Key.

  • Type: System.String
  • Parameter sets: (All)

-S3AssumeRoleArn

AWS IAM Role ARN for AssumeRole authentication.

  • Type: System.String
  • Parameter sets: (All)

-S3AssumeRoleDurationSeconds

Session duration in seconds for AssumeRole authentication (900-43200).

  • Type: System.Int64
  • Parameter sets: (All)

-CloudflareAccessKey

Cloudflare: Access Key.

  • Type: System.String
  • Parameter sets: (All)

-FilebaseAccessKey

Filebase: Access Key.

  • Type: System.String
  • Parameter sets: (All)

-GoogleCloudStorageS3CompatibleAccessKey

Google Cloud Storage: S3-compatible Access Key.

  • Type: System.String
  • Parameter sets: (All)

-LinodeAccessKey

Linode: Access Key

  • Type: System.String
  • Parameter sets: (All)

-S3CompatibleAccessKey

S3-compatible: Access Key

  • Type: System.String
  • Parameter sets: (All)

-SharepointClientId

SharePoint: Microsoft Entra application client ID for app-only authentication.

  • Type: System.String
  • Parameter sets: (All)

-SharepointTenantId

SharePoint: Microsoft Entra tenant ID for app-only authentication.

  • Type: System.String
  • Parameter sets: (All)

-Username

Remote server username.

  • Type: System.String
  • Parameter sets: (All)

-WasabiAccessKey

Wasabi: Access Key.

  • Type: System.String
  • Parameter sets: (All)

-Password

Password, if needed. Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-PrivateKey

Private key, if needed. Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-PrivateKeyPassphrase

Passphrase for private key if needed. Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-AwsSecretKey

AWS: secret key. Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-AzureBlobStorageAccessKey

Azure Blob Storage: Access Key Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-AzureBlobStorageSasToken

Azure Blob Storage: Shared Access Signature (SAS) token Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-AzureFilesStorageAccessKey

Azure File Storage: Access Key Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-AzureFilesStorageSasToken

Azure File Storage: Shared Access Signature (SAS) token Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-BackblazeB2ApplicationKey

Backblaze B2 Cloud Storage: applicationKey Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-BackblazeB2KeyId

Backblaze B2 Cloud Storage: keyID

  • Type: System.String
  • Parameter sets: (All)

-CloudflareSecretKey

Cloudflare: Secret Key Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-FilebaseSecretKey

Filebase: Secret Key Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-GoogleCloudStorageCredentialsJson

Google Cloud Storage: JSON file that contains the private key. To generate see https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-GoogleCloudStorageS3CompatibleSecretKey

Google Cloud Storage: S3-compatible secret key Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-LinodeSecretKey

Linode: Secret Key Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-S3CompatibleSecretKey

S3-compatible: Secret Key Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-SharepointClientCertificate

SharePoint: PEM-encoded certificate and unencrypted private key for app-only authentication. Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-SharepointClientSecret

SharePoint: Microsoft Entra application client secret for app-only authentication. Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-WasabiSecretKey

Wasabi: Secret Key Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-WorkspaceId

Workspace ID (0 for default workspace)

  • Type: System.Int64
  • Parameter sets: (All)

-CopyValuesFromCredentialId

ID of Remote Server Credential to copy omitted values from.

  • Type: System.Int64
  • Parameter sets: (All)

-Connection

The connection to use, from Connect-FilesAccount. Defaults to the connection of the -InputObject or -Continuation given, and otherwise to the current runspace's default connection.

  • Type: FilesCom.PowerShell.FilesConnection
  • Parameter sets: (All)

-WorkspaceScope

Runs this command's requests in this workspace, including workspace 0, instead of the connection's or, for an -InputObject, instead of the workspace the object was read in. The connection and the object are unchanged.

  • Type: System.Int64
  • Parameter sets: (All)

-NoWorkspaceScope

Runs this command's requests in no workspace, even if the connection has one. The connection itself is unchanged.

  • Type: System.Management.Automation.SwitchParameter
  • Parameter sets: (All)

-Confirm

Prompts you for confirmation before running the cmdlet.

  • Type: System.Management.Automation.SwitchParameter
  • Confirm impact: High. At the default $ConfirmPreference of High, the command asks before each change; -Confirm:$false runs it without asking.

-WhatIf

Shows what the cmdlet would change without sending anything to Files.com.

  • Type: System.Management.Automation.SwitchParameter

Common Parameters

This cmdlet supports the PowerShell common parameters, such as -Verbose and -ErrorAction.

Inputs

None. The command takes no pipeline input.

Outputs

  • FilesCom.PowerShell.Models.RemoteServerCredential: the remote server credential as Files.com returned it.

Notes

Failures are written as error records with IDs such as Files.NotFound or Files.Authentication. Run Get-Help about_FilesCom for connections, paging, errors and previewing changes.