Set-FilesRemoteServerCredential

Update Remote Server Credential.

Syntax

Id (Default)

Set-FilesRemoteServerCredential [-Id] <System.Int64> [-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>] [-Connection <FilesCom.PowerShell.FilesConnection>] [-WorkspaceScope <System.Int64>] [-NoWorkspaceScope] [-WhatIf] [-Confirm] [<CommonParameters>]

InputObject

Set-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>] -InputObject <FilesCom.PowerShell.Models.RemoteServerCredential> [-Connection <FilesCom.PowerShell.FilesConnection>] [-WorkspaceScope <System.Int64>] [-NoWorkspaceScope] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Update Remote Server Credential.

The command accepts remote server credentials from the pipeline as -InputObject, and uses each one's Id and the connection that fetched it.

When given -InputObject, the command updates that object with the values Files.com returns and writes it.

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: Update Remote Server Credential

Set-FilesRemoteServerCredential -Id 1 -Name 'My Credential' -Description 'More information or notes about this credential.'

Writes the remote server credential as Files.com returns it.

Example 2: Act on remote server credentials from the pipeline

Get-FilesRemoteServerCredential -Id 1 | Set-FilesRemoteServerCredential -Name 'My Credential' -Description 'More information or notes about this credential.'

Takes the remote server credential from the pipeline and uses its Id and connection.

Example 3: Preview the change

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

Describes the change without sending anything to Files.com.

Parameters

-Id

Remote Server Credential ID.

  • Type: System.Int64
  • Parameter sets: Id (required, position 0)

-Name

Internal name for your reference

  • Type: System.String
  • Parameter sets: Id, InputObject

-Description

Internal description for your reference

  • Type: System.String
  • Parameter sets: Id, InputObject

-ServerType

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

  • Type: System.String
  • Parameter sets: Id, InputObject

-AwsAccessKey

AWS Access Key.

  • Type: System.String
  • Parameter sets: Id, InputObject

-S3AssumeRoleArn

AWS IAM Role ARN for AssumeRole authentication.

  • Type: System.String
  • Parameter sets: Id, InputObject

-S3AssumeRoleDurationSeconds

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

  • Type: System.Int64
  • Parameter sets: Id, InputObject

-CloudflareAccessKey

Cloudflare: Access Key.

  • Type: System.String
  • Parameter sets: Id, InputObject

-FilebaseAccessKey

Filebase: Access Key.

  • Type: System.String
  • Parameter sets: Id, InputObject

-GoogleCloudStorageS3CompatibleAccessKey

Google Cloud Storage: S3-compatible Access Key.

  • Type: System.String
  • Parameter sets: Id, InputObject

-LinodeAccessKey

Linode: Access Key

  • Type: System.String
  • Parameter sets: Id, InputObject

-S3CompatibleAccessKey

S3-compatible: Access Key

  • Type: System.String
  • Parameter sets: Id, InputObject

-SharepointClientId

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

  • Type: System.String
  • Parameter sets: Id, InputObject

-SharepointTenantId

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

  • Type: System.String
  • Parameter sets: Id, InputObject

-Username

Remote server username.

  • Type: System.String
  • Parameter sets: Id, InputObject

-WasabiAccessKey

Wasabi: Access Key.

  • Type: System.String
  • Parameter sets: Id, InputObject

-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: Id, InputObject

-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: Id, InputObject

-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: Id, InputObject

-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: Id, InputObject

-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: Id, InputObject

-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: Id, InputObject

-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: Id, InputObject

-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: Id, InputObject

-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: Id, InputObject

-BackblazeB2KeyId

Backblaze B2 Cloud Storage: keyID

  • Type: System.String
  • Parameter sets: Id, InputObject

-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: Id, InputObject

-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: Id, InputObject

-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: Id, InputObject

-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: Id, InputObject

-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: Id, InputObject

-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: Id, InputObject

-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: Id, InputObject

-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: Id, InputObject

-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: Id, InputObject

-InputObject

The remote server credential to act on, such as one written by another command of the module, from the pipeline. The command uses its Id and the connection that fetched it.

  • Type: FilesCom.PowerShell.Models.RemoteServerCredential
  • Parameter sets: InputObject (required)

-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

  • FilesCom.PowerShell.Models.RemoteServerCredential: a remote server credential from another command of the module, as -InputObject.

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.