4. Remove WOPI Bindings from SharePoint
Scenario/Problem: You need to remove WOPI bindings from SharePoint.
Solution: Use the Remove-SPWOPIBinding
cmdlet.
The Remove-SPWOPIBinding
cmdlet
has three different parameter sets that can be used to remove bindings.
The simplest set removes all bindings and needs only the -All
switch parameter, as shown in Listing 4.
Listing 4. Removing All WOPI Bindings from SharePoint
Remove-SPWOPIBinding -All
Provide a specific binding using the identity pipe parameter to remove a specific binding (as shown in Listing 5) or simply provide the same parameters to Remove-SPWOPIBinding
as you would to get the binding (as shown in Listing 6).
Listing 5. Removing a Specific Binding Using the Identity Pipe
Get-SPWOPIBinding -Application "Excel" | Remove-SPWOPIBinding
Listing 6. Removing a Specific Binding Using Parameters
Remove-SPWOPIBinding -Application "Excel"
Use the following parameters to identify a specific binding:
• Action
: String that specifies a specific action to return (such as view
or edit
)
• Application
: String that specifies a specific application to return (such as Excel
)
• Extension
: String that specifies a specific file extension to return (such as doc
or xls
)
• Server
: String that specifies a specific WOPI server to return
• WOPIZone
: String that specifies a specific zone to return
5. Configure the WOPI SharePoint Zone
Scenario/Problem: You need to configure the zone that SharePoint will use to navigate the browser to the WOPI application.
Solution: Use the Set-SPWOPIZone
cmdlet.
The Set-SPWOPIZone
cmdlet is
used solely to configure the zone in which SharePoint uses to navigate
the browser to the WOPI application. The zone is specified using the -Zone
parameter and can be one of the following values:
• Internal-HTTP
• Internal-HTTPS
• External-HTTP
• External-HTTPS
6. Disable Certain WOPI Actions
Scenario/Problem:
You need to disable certain WOPI actions within SharePoint such that
other Office document functionality functions properly (e.g. Excel
Services to view workbooks instead of launching WOPI).
Solution: Use the New-SPWOPISuppressionSetting
cmdlet.
The New-SPWOPISuppressionSetting
cmdlet is used to disable Office Web App functionality for the
specified action, file extension, and/or programmatic identifier. You
can view the current bindings using the Get-SPWOPIBinding
cmdlet and retrieve the available values for the parameters. Typically, the -Action
and -Extension
parameters are used together to suppress an action for a particular document type, as shown in Listing 7.
Listing 7. Suppressing an Action on a Specific File Extension
New-SPWOPISuppressionSetting -Action "View" -Extension "xls"
To view current suppression settings, use the Get-SPWOPISuppressionSetting
cmdlet without any parameters. You can also remove any suppression setting by using the Remove-SPWOPISuppressionSetting
cmdlet with the action and extension or by providing the identity of the specific suppression setting.
8. Resolve Invalid Proof Signature
Scenario/Problem: You discover that WOPI functionality is not functioning and find “Invalid Proof Signature” messages within the SharePoint logs.
Solution: Use the Update-SPWOPIProofKey
cmdlet with the WOPI server name.
WOPI uses a public key to for communication
between the SharePoint farm and the Office Web Apps server. Sometimes
keys become unsynchronized and need to be reset. Use the Update-SPWOPIProofKey
cmdlet with the optional -ServerName
parameter to update the public key and resolve any invalid proof signature issues. Listing 8 shows an example.
Listing 8. Updating the WOPI Public Key
Update-SPWOPIProofKey -ServerName "Office.mycompany.com"