New-FilesRemoteServerCredential
Create Remote Server Credential.
Syntax
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
Writes the remote server credential returned.
Example 2: Preview the change
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
$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
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.