New-FilesBundle

Create Share Link.

Syntax

New-FilesBundle [-UserId <System.Int64>] -Paths <System.String[]> [-Password <System.Security.SecureString>] [-BypassesSiteExpirationRules <System.Boolean>] [-FormFieldSetId <System.Int64>] [-CreateSnapshot <System.Boolean>] [-DontSeparateSubmissionsByFolder <System.Boolean>] [-ExpiresAt <System.DateTimeOffset>] [-FinalizeSnapshot <System.Boolean>] [-MaxUses <System.Int64>] [-GroupId <System.Int64>] [-InternalName <System.String>] [-Description <System.String>] [-Note <System.String>] [-Code <System.String>] [-PathTemplate <System.String>] [-PathTemplateTimeZone <System.String>] [-Permissions <System.String>] [-RequireRegistration <System.Boolean>] [-ClickwrapId <System.Int64>] [-InboxId <System.Int64>] [-RequireShareRecipient <System.Boolean>] [-SendOneTimePasswordToRecipientAtRegistration <System.Boolean>] [-SendEmailReceiptToUploader <System.Boolean>] [-SkipEmail <System.Boolean>] [-SkipName <System.Boolean>] [-SkipCompany <System.Boolean>] [-StartAccessOnDate <System.DateTimeOffset>] [-SnapshotId <System.Int64>] [-WorkspaceId <System.Int64>] [-WatermarkAttachmentFile <FilesCom.PowerShell.FilesAttachment>] [-WatermarkValue <System.Collections.IDictionary>] [-Connection <FilesCom.PowerShell.FilesConnection>] [-WorkspaceScope <System.Int64>] [-NoWorkspaceScope] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Create Share Link.

The command supports -WhatIf, which describes the change without sending it to Files.com, and -Confirm, which asks before sending it.

File parameters take a FilesAttachment: a local file from Get-Item, such as (Get-Item ./logo.png), or one New-FilesAttachment makes from a file, bytes or a stream. The file goes in the same request as the other parameters, whose values are sent exactly as they would be without it; a local file is opened, and a stream read, only when the command goes ahead with the change: never under -WhatIf or when a confirmation is declined. A stream is borrowed: the command leaves it open.

Examples

New-FilesBundle -Paths 'file.txt' -BypassesSiteExpirationRules $true -DontSeparateSubmissionsByFolder $true

Writes the bundle returned.

Example 2: Preview the change

New-FilesBundle -Paths 'file.txt' -BypassesSiteExpirationRules $true -DontSeparateSubmissionsByFolder $true -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)

-Paths

A list of paths to include in this bundle.

  • Type: System.String[]
  • Parameter sets: (All) (required)

-Password

Password for this bundle. 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)

-BypassesSiteExpirationRules

If true, this Share Link bypasses site-wide expiration rules. Only site admins may set this.

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

-FormFieldSetId

Id of Form Field Set to use with this bundle

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

-CreateSnapshot

If true, create a snapshot of this bundle's contents.

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

-DontSeparateSubmissionsByFolder

Do not create subfolders for files uploaded to this share. Note: there are subtle security pitfalls with allowing anonymous uploads from multiple users to live in the same folder. We strongly discourage use of this option unless absolutely required.

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

-ExpiresAt

Explicit Bundle expiration date/time. If not set, the site-wide expiration setting may apply. Give a DateTime from Get-Date, a DateTimeOffset, or ISO 8601 text with an offset such as 2026-01-31T14:00:00Z.

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

-FinalizeSnapshot

If true, finalize the snapshot of this bundle's contents. Note that create_snapshot must also be true.

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

-MaxUses

Maximum number of times bundle can be accessed

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

-GroupId

Owning group ID. If set, members of this group can view, edit, and share this Share Link.

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

-InternalName

Internal name for identifying this Share Link.

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

-Description

Public description

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

-Note

Bundle internal note

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

-Code

Bundle code. This code forms the end part of the Public URL.

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

-PathTemplate

Template for creating submission subfolders. Can use the uploader's name, email address, ip, company, strftime directives, and any custom form data.

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

-PathTemplateTimeZone

Timezone to use when rendering timestamps in path templates.

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

-Permissions

Permissions that apply to Folders in this Share Link.

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

-RequireRegistration

Show a registration page that captures the downloader's name and email address?

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

-ClickwrapId

ID of the clickwrap to use with this bundle.

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

-InboxId

ID of the associated inbox, if available.

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

-RequireShareRecipient

Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?

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

-SendOneTimePasswordToRecipientAtRegistration

If true, require_share_recipient bundles will send a one-time password to the recipient when they register. Cannot be enabled if the bundle has a password set.

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

-SendEmailReceiptToUploader

Send delivery receipt to the uploader. Note: For writable share only

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

-SkipEmail

BundleRegistrations can be saved without providing email?

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

-SkipName

BundleRegistrations can be saved without providing name?

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

-SkipCompany

BundleRegistrations can be saved without providing company?

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

-StartAccessOnDate

Date when share will start to be accessible. If nil access granted right after create. Give a DateTime from Get-Date, a DateTimeOffset, or ISO 8601 text with an offset such as 2026-01-31T14:00:00Z.

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

-SnapshotId

ID of the snapshot containing this bundle's contents.

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

-WorkspaceId

Workspace ID. 0 means the default workspace.

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

-WatermarkAttachmentFile

Preview watermark image applied to all bundle items. Give a FilesAttachment, such as (Get-Item ./file.png) or one from New-FilesAttachment.

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

-WatermarkValue

Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value Give a hashtable or PSCustomObject; keys keep their case and values their types.

  • Type: System.Collections.IDictionary
  • 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: Medium. At the default $ConfirmPreference of High, the command runs without asking; -Confirm makes it ask before each change.

-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.Bundle: the bundle 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.