New-FilesAs2Partner

Create AS2 Partner.

Syntax

New-FilesAs2Partner [-EnableDedicatedIps <System.Boolean>] [-HttpAuthUsername <System.String>] [-HttpAuthPassword <System.Security.SecureString>] [-MdnValidationLevel <System.String>] [-SignatureValidationLevel <System.String>] [-ServerCertificate <System.String>] [-DefaultMimeType <System.String>] [-AdditionalHttpHeaders <System.Collections.IDictionary>] -As2StationId <System.Int64> -Name <System.String> -Uri <System.String> [-PublicCertificate <System.String>] [-Pkcs12 <System.Security.SecureString>] [-Pkcs12Password <System.Security.SecureString>] [-Connection <FilesCom.PowerShell.FilesConnection>] [-WorkspaceScope <System.Int64>] [-NoWorkspaceScope] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Create AS2 Partner.

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 AS2 Partner

New-FilesAs2Partner -As2StationId 1 -Name 'AS2 Partner Name' -Uri 'example' -EnableDedicatedIps $true -HttpAuthUsername 'username'

Writes the as2 partner returned.

Example 2: Preview the change

New-FilesAs2Partner -As2StationId 1 -Name 'AS2 Partner Name' -Uri 'example' -EnableDedicatedIps $true -HttpAuthUsername 'username' -WhatIf

Describes the change without sending anything to Files.com.

Parameters

-EnableDedicatedIps

If true, we will use your site's dedicated IPs for all outbound connections to this AS2 Partner.

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

-HttpAuthUsername

Username to send to server for HTTP Authentication.

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

-HttpAuthPassword

Password to send to server for HTTP 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)

-MdnValidationLevel

How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. none: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. weak: Inspect the MDN for MIC and Disposition only. normal: weak plus validate MDN signature matches body, strict: normal but do not allow signatures from self-signed or incorrectly purposed certificates. auto: Automatically set the correct value for this setting based on next mdn received.

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

-SignatureValidationLevel

Should Files.com require signatures on incoming AS2 messages? normal: require that incoming messages are signed with a valid matching signature. none: Unsigned incoming messages are allowed. auto: A one-time starting state. The next message received is always accepted and switches this to normal if it carries a valid signature, or none if it does not.

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

-ServerCertificate

Should we require that the remote HTTP server have a valid SSL Certificate for HTTPS? (This only applies to Outgoing AS2 message from Files.com to a Partner.)

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

-DefaultMimeType

Default mime type of the file attached to the encrypted message

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

-AdditionalHttpHeaders

Additional HTTP Headers for outgoing message sent to this partner. Give a hashtable or PSCustomObject; keys keep their case and values their types.

  • Type: System.Collections.IDictionary
  • Parameter sets: (All)

-As2StationId

ID of the AS2 Station associated with this partner.

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

-Name

The partner's formal AS2 name.

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

-Uri

Public URI where we will send the AS2 messages (via HTTP/HTTPS).

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

-PublicCertificate

Public certificate for AS2 Partner. Note: This is the certificate for AS2 message security, not a certificate used for HTTPS authentication.

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

-Pkcs12

Base64-encoded PKCS#12 (.pfx or .p12) file containing the partner's public certificate. Provide this instead of public_certificate. Any private key in the file is discarded. A public-only file must contain exactly one certificate. 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)

-Pkcs12Password

Password for pkcs12. The file and password are used only for import; the extracted public certificate is stored as PEM. 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)

-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.As2Partner: the as2 partner 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.