Configure the Default Action for an Application

Scenario/Problem: You need to configure the default action for an application.

Solution: Use the Set-SPWOPIBinding cmdlet.

The Set-SPWOPIBinding cmdlet is used to set the default action of applications. This is achieved by providing the -DefaultAction switch parameter, along with a WOPIBinding object via the -Identity parameter.

Use the Get-SPWOPIBinding cmdlet, explained in the previous section, to set a variable to a specific binding or pipe the results into the Set-SPWOPIBinding cmdlet, as shown in Listing 26.3.

Listing 26.3. Configuring the Default Action for Excel Documents in SharePoint

Get-SPWOPIBinding -Action "View" -Application "Excel"| Set-SPWOPIBinding -DefaultAction:$true

Get PowerShell™ for SharePoint® 2013 How-To now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.