New-FilesRemoteServer

Create Remote Server.

Syntax

New-FilesRemoteServer [-UserId <System.Int64>] [-Password <System.Security.SecureString>] [-PrivateKey <System.Security.SecureString>] [-PrivateKeyPassphrase <System.Security.SecureString>] [-ResetAuthentication <System.Boolean>] [-SharepointClientCertificate <System.Security.SecureString>] [-SharepointClientSecret <System.Security.SecureString>] [-SslCertificate <System.String>] [-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>] [-WasabiSecretKey <System.Security.SecureString>] [-AllowRelativePaths <System.Boolean>] [-AwsAccessKey <System.String>] [-AzureBlobStorageAccount <System.String>] [-AzureBlobStorageContainer <System.String>] [-AzureBlobStorageDnsSuffix <System.String>] [-AzureBlobStorageHierarchicalNamespace <System.Boolean>] [-AzureFilesStorageAccount <System.String>] [-AzureFilesStorageDnsSuffix <System.String>] [-AzureFilesStorageShareName <System.String>] [-BackblazeB2Bucket <System.String>] [-BackblazeB2S3Endpoint <System.String>] [-BufferUploads <System.String>] [-CloudflareAccessKey <System.String>] [-CloudflareBucket <System.String>] [-CloudflareEndpoint <System.String>] [-Description <System.String>] [-DropboxTeams <System.Boolean>] [-EnableDedicatedIps <System.Boolean>] [-FilebaseAccessKey <System.String>] [-FilebaseBucket <System.String>] [-FilesApiKey <System.Security.SecureString>] [-FilesAgentPermissionSet <System.String>] [-FilesAgentRoot <System.String>] [-FilesAgentVersion <System.String>] [-OutboundAgentId <System.Int64>] [-CustomDomainId <System.Int64>] [-GoogleCloudStorageAuthenticationMethod <System.String>] [-GoogleCloudStorageBucket <System.String>] [-GoogleCloudStorageOauthScope <System.String>] [-GoogleCloudStorageProjectId <System.String>] [-GoogleCloudStorageS3CompatibleAccessKey <System.String>] [-Hostname <System.String>] [-LinodeAccessKey <System.String>] [-LinodeBucket <System.String>] [-LinodeRegion <System.String>] [-MaxConnections <System.Int64>] [-Name <System.String>] [-OneDriveAccountType <System.String>] [-PinToSiteRegion <System.Boolean>] [-Port <System.Int64>] [-UploadStagingPath <System.String>] [-RemoteServerCredentialId <System.Int64>] [-S3AssumeRoleArn <System.String>] [-S3AssumeRoleDurationSeconds <System.Int64>] [-S3Bucket <System.String>] [-S3CompatibleAccessKey <System.String>] [-S3CompatibleBucket <System.String>] [-S3CompatibleEndpoint <System.String>] [-S3CompatibleRegion <System.String>] [-S3CompatibleVirtualHostedStyle <System.Boolean>] [-S3KmsKeyId <System.String>] [-S3Region <System.String>] [-ServerCertificate <System.String>] [-ServerHostKey <System.String>] [-ServerType <System.String>] [-SharepointClientId <System.String>] [-SharepointSiteUrl <System.String>] [-SharepointTenantId <System.String>] [-Ssl <System.String>] [-Username <System.String>] [-WasabiAccessKey <System.String>] [-WasabiBucket <System.String>] [-WasabiRegion <System.String>] [-WorkspaceId <System.Int64>] [-Connection <FilesCom.PowerShell.FilesConnection>] [-WorkspaceScope <System.Int64>] [-NoWorkspaceScope] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Create Remote Server.

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

New-FilesRemoteServer -AllowRelativePaths $true -AwsAccessKey 'example'

Writes the remote server returned.

Example 2: Preview the change

New-FilesRemoteServer -AllowRelativePaths $true -AwsAccessKey 'example' -WhatIf

Describes the change without sending anything to Files.com.

Parameters

-UserId

User ID. Provide a value of 0 to operate the current session's user.

  • Type: System.Int64
  • 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)

-ResetAuthentication

Reset authenticated account?

  • Type: System.Boolean
  • 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)

-SslCertificate

SSL client certificate.

  • Type: System.String
  • 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)

-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)

-AllowRelativePaths

Allow relative paths in SFTP. If true, paths will not be forced to be absolute, allowing operations relative to the user's home directory.

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

-AwsAccessKey

AWS Access Key.

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

-AzureBlobStorageAccount

Azure Blob Storage: Account name

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

-AzureBlobStorageContainer

Azure Blob Storage: Container name

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

-AzureBlobStorageDnsSuffix

Azure Blob Storage: Custom DNS suffix

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

-AzureBlobStorageHierarchicalNamespace

Azure Blob Storage: Does the storage account has hierarchical namespace feature enabled?

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

-AzureFilesStorageAccount

Azure Files: Storage Account name

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

-AzureFilesStorageDnsSuffix

Azure Files: Custom DNS suffix

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

-AzureFilesStorageShareName

Azure Files: Storage Share name

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

-BackblazeB2Bucket

Backblaze B2 Cloud Storage: Bucket name

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

-BackblazeB2S3Endpoint

Backblaze B2 Cloud Storage: S3 Endpoint

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

-BufferUploads

If set to always, uploads to this server will be uploaded first to Files.com before being sent to the remote server. This can improve performance in certain access patterns, such as high-latency connections. It will cause data to be temporarily stored in Files.com. If set to auto, we will perform this optimization if we believe it to be a benefit in a given situation.

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

-CloudflareAccessKey

Cloudflare: Access Key.

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

-CloudflareBucket

Cloudflare: Bucket name

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

-CloudflareEndpoint

Cloudflare: endpoint

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

-Description

Internal description for your reference

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

-DropboxTeams

Dropbox: If true, list Team folders in root?

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

-EnableDedicatedIps

true if remote server only accepts connections from dedicated IPs

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

-FilebaseAccessKey

Filebase: Access Key.

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

-FilebaseBucket

Filebase: Bucket name

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

-FilesApiKey

Files.com direct link: API key used once to pair the remote server. 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)

-FilesAgentPermissionSet

Agent file permissions: read_only, write_only, or read_write. Files.com writes this value as permission_set in the configuration file generated for this Remote Server. Setting it on Create or Update changes the generated file, not a running Agent. The Agent enforces the permissions in its local configuration file, controlled by the host's system administrator, and reports them at registration, replacing the stored value.

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

-FilesAgentRoot

Agent local root path. Files.com writes this value as root in the configuration file generated for this Remote Server. Setting it on Create or Update changes the generated file, not a running Agent. The Agent enforces the root in its local configuration file, controlled by the host's system administrator, and reports it at registration, replacing the stored value.

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

-FilesAgentVersion

Files.com Agent version reported by the Agent at each registration, replacing the stored value. This field is not included in the generated Agent configuration file. Setting it on Create or Update does not update the running Agent.

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

-OutboundAgentId

Route traffic to outbound on a files-agent

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

-CustomDomainId

Custom Domain ID whose dedicated IP addresses are selected when this Remote Server uses dedicated IPs. Must be available to this Remote Server's workspace. Requires enable_dedicated_ips and cannot be combined with an outbound Agent. Set to null to use the site's default dedicated IPs.

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

-GoogleCloudStorageAuthenticationMethod

Google Cloud Storage: Authentication method. Can be json, hmac, or oauth.

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

-GoogleCloudStorageBucket

Google Cloud Storage: Bucket Name

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

-GoogleCloudStorageOauthScope

Google Cloud Storage: OAuth scope. Can be https://www.googleapis.com/auth/devstorage.read_only or https://www.googleapis.com/auth/devstorage.read_write.

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

-GoogleCloudStorageProjectId

Google Cloud Storage: Project ID

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

-GoogleCloudStorageS3CompatibleAccessKey

Google Cloud Storage: S3-compatible Access Key.

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

-Hostname

Hostname or IP address. For Agent Remote Servers, the Agent reports the hostname it connects from at each registration, replacing the stored value. This field is not included in the generated Agent configuration file. Setting it on Create or Update does not change the running Agent.

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

-LinodeAccessKey

Linode: Access Key

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

-LinodeBucket

Linode: Bucket name

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

-LinodeRegion

Linode: region

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

-MaxConnections

Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).

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

-Name

Internal name for your reference

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

-OneDriveAccountType

OneDrive: Either personal or business_other account types

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

-PinToSiteRegion

If true, we will ensure that all communications with this remote server are made through the primary region of the site. This setting can also be overridden by a site-wide setting which will force it to true.

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

-Port

Port for remote server. For Agent Remote Servers, the Agent reports its downstream proxy port at each registration, replacing the stored value. This field is not included in the generated Agent configuration file. Setting it on Create or Update does not change the running Agent.

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

-UploadStagingPath

Upload staging path. Applies to SFTP only. If a path is provided here, files will first be uploaded to this path on the remote folder and the moved into the final correct path via an SFTP move command. This is required by some remote MFT systems to emulate atomic uploads, which are otherwise not supoprted by SFTP.

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

-RemoteServerCredentialId

ID of Remote Server Credential, if applicable.

  • Type: System.Int64
  • 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)

-S3Bucket

S3 bucket name

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

-S3CompatibleAccessKey

S3-compatible: Access Key

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

-S3CompatibleBucket

S3-compatible: Bucket name

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

-S3CompatibleEndpoint

S3-compatible: endpoint

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

-S3CompatibleRegion

S3-compatible: region

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

-S3CompatibleVirtualHostedStyle

S3-compatible: If true, use virtual-hosted-style URLs instead of path-style URLs

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

-S3KmsKeyId

ARN of the AWS KMS key that encrypts files written to the bucket (SSE-KMS). Leave blank unless your bucket requires a specific key.

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

-S3Region

S3 region

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

-ServerCertificate

Remote server certificate

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

-ServerHostKey

Pinned SSH host key or OpenSSH host certificate for SFTP. If omitted, Files.com detects and stores a host key, preferring plain keys over certificates. With server_certificate=require_match (the default), the server must present the exact pinned key or certificate and prove it holds the matching private key. A pinned certificate is compared in full, so renewal can require updating server_host_key even when its underlying key is unchanged. Files.com does not check certificate CA signatures, principals, or validity periods. Certificate expiration alone does not end the pin. Update server_host_key to replace the pin.

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

-ServerType

Remote server type.

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

-SharepointClientId

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

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

-SharepointSiteUrl

SharePoint: Site URL to scope app-only authentication to a single site. Leave blank to browse all sites.

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

-SharepointTenantId

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

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

-Ssl

Should we require SSL?

  • 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)

-WasabiBucket

Wasabi: Bucket name

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

-WasabiRegion

Wasabi: Region

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

-WorkspaceId

Workspace ID (0 for default workspace)

  • 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.RemoteServer: the remote server 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.