SharePoint Renew HTTPS Certificate


  1. 步驟
    1. 登入 SharePoint Server
    2. 登入 Office Online Server
    3. 再度登入 SharePoint Server
    4. 重新綁定 PDF Reader
  2. 相關連結

說明如何將地端版的 SharePoint 以及 Office Online Server 進行 HTTPS 憑證更新。

logo

步驟

登入 SharePoint Server

將新憑證匯入,目的端選擇個人

使用 inetmgr (IIS Manager),將 SharePoint 站台調整綁定的憑證為新憑證

登入 Office Online Server

將新憑證匯入,目的端選擇個人

Powershell ISE (run as sysadmin)

Get-OfficeWebAppsFarm > C:\OOSFarm.txt

Remove-OfficeWebAppsMachine

New-OfficeWebAppsFarm -InternalUrl "http://OfficeOnlineServer.FQDN"
-ExternalURL "https://OfficeOnlineServer.FQDN"
-CertificateName "CertName" -AllowHttp -EditingEnabled 
-OpenFromURLEnabled -AllowHttpSecureStoreConnections:$true

其中 OfficeOnlineServer.FQDN 要輸入 office Online 的 Server Hostname,並輸入完整 FQDN (domain.com.tw)。

⚠️ CertificateName 調整為新的憑證名稱,可以使用 MMC 進行確認。

再度登入 SharePoint Server

重新登入 SharePoint Server 進行 ReBinding

If( (Get-SPSecurityTokenServiceConfig).AllowOAuthOverHttp -eq $False)
{
$config = (Get-SPSecurityTokenServiceConfig)
$config.AllowOAuthOverHttp = $true
$config.Update()
(Get-SPSecurityTokenServiceConfig).AllowOAuthOverHttp
}

Remove-SPWOPIBinding -All:$true

New-SPWOPIBinding -ServerName OfficeOnlineServer.FQDN -AllowHTTP

重新綁定 PDF Reader

完成上述步驟後,會清除原本使用瀏覽器開啟 PDF 的綁定關係,因此必須繼續在 SharePoint 2016 管理命令介面 重新綁定:

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

Control whether PDFs open in Word Web App or the default PDF reader | Learn.microsoft

相關連結

Office Online 無法正常線上瀏覽特定格式文件 | sdwh.dev