Set-FilesRemoteServerCredential
Update Remote Server Credential.
Syntax
Id (Default)
InputObject
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
Writes the remote server credential as Files.com returns it.
Example 2: Act on remote server credentials from the pipeline
Takes the remote server credential from the pipeline and uses its Id and connection.
Example 3: Preview the change
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
$ConfirmPreferenceofHigh, the command asks before each change;-Confirm:$falseruns 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.