0
Get-SPWOPIBinding -Action "MobileView" -Application "WordPDF" | Remove-SPWOPIBinding -Confirm:$false
Get-SPWOPIBinding -Application "WordPDF" | Remove-SPWOPIBinding -Confirm:$false

Hi, I recently ran the above command on my SharePoint 2016 server, does anyone know how I can reverse the changes that it makes? Thanks!

1 Answer 1

1

If you didn't have any fancy settings configured previously, the best approach is to first disconnect SharePoint from Office Server and connect it back from scratch. So can do the following:

Remove-SPWOPIBinding -All:$true

Reconnect SharePoint to OWA by running the following. Bear in mind, that this assumes your OWA uses HTTP instead of HTTPS:

New-SPWOPIBinding -ServerName <WacServerName> -AllowHTTP
Get-SPWOPIZone
Set-SPWOPIZone -zone "internal-http"
(Get-SPSecurityTokenServiceConfig).AllowOAuthOverHttp
$config = (Get-SPSecurityTokenServiceConfig)
$config.AllowOAuthOverHttp = $true
$config.Update()

More details in Configure Office Online Server for SharePoint Server

Alternatively, you can try the following command:

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.

1
  • Hi, I have just tried running these commands but I am still getting "Sorry something went wrong. An error has occurred on the server" whenever I hover over a PDF in search results it only seems to be PDF's that are affected, do you have any ideas why?
    – Ben Cooper
    Commented Mar 15, 2022 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.