Share via


New-SPWOPIBinding

Creates a new binding to associate file name extensions or applications with actions on the current SharePoint farm where this cmdlet is run.

Syntax

Default (Default)

New-SPWOPIBinding
    -ServerName <String>
    [-Action <String>]
    [-AllowHTTP]
    [-Application <String>]
    [-AssignmentCollection <SPAssignmentCollection>]
    [-Confirm]
    [-Extension <String>]
    [-FileName <String>]
    [-ProgId <String>]
    [-WhatIf]
    [<CommonParameters>]

Description

The New-SPWOPIBinding cmdlet associates file name extensions or applications to actions on the current SharePoint farm where this cmdlet is run. Each binding allows you to use the WOPI application to view or edit files in your SharePoint library. For example, when a user sees a Word document in a SharePoint document list, the SharePoint list will display the available options to view or edit the document based on the actions that are bound to Word on that SharePoint farm.

To use a WOPI application, such as a server that runs Office Web Apps Server, for Office Web Apps, you must run this cmdlet on the SharePoint farm before you can use the Office Web Apps.

If you run New-SPWOPIBinding for an application or file name extension where the binding (or association) already exists, the cmdlet will fail.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at SharePoint Server Cmdlets.

Examples

EXAMPLE 1

New-SPWOPIBinding -ServerName "Server.corp.Contoso.com"

This example creates bindings for all the applications and file name extensions that the WOPI application supports on the current SharePoint farm where this cmdlet is run.

EXAMPLE 2

New-SPWOPIBinding -ServerName "Server.corp.Contoso.com" -Application "Excel"

This example associates Excel with all the actions that the WOPI application supports for Excel on the current SharePoint farm where this cmdlet is run.

Parameters

-Action

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the action to bind.

For example, "view," "edit," and "embedview." For a list of actions that the WOPI application supports, run Get-SPWOPIBinding. Typically, you will not use this parameter.

If you specify some actions but not others, some SharePoint features may not work.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AllowHTTP

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies that the cmdlet can use HTTP for discovery of what the WOPI application supports.

If this is specified as True, the discovery information from the WOPI application will be sent on a nonsecure connection.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Application

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies applications to bind.

Possible applications are as follows: "Word," "Excel," "PowerPoint," or "OneNote." Run Get-SPWOPIBinding to get the full list of application the WOPI application supports.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AssignmentCollection

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Parameter properties

Type:SPAssignmentCollection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Extension

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the file name extensions to bind.

Run Get-SPWOPIBinding to get the list of file name extensions the WOPI application supports.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FileName

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the path of the xml file that contains the discover information for the WOPI application.

You can load discovery information from an xml file instead of requesting from the WOPI application directly.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ProgId

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the programmatic identifier (ProgID) for an application to bind.

Run Get-SPWOPIBinding to get the list of ProgIDs that the WOPI application supports.

You may only want to use this parameter to associate an action to an OneNote folder.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ServerName

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the name or fully qualified domain name (FQDN) of the WOPI application (such as a server that runs Office Web Apps Server).

This can also be an FQDN of a load balanced endpoint for multiple Office Web Apps servers.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.