在 SharePoint Server 中發佈服務應用程式Publish service applications in SharePoint Server

摘要:了解如何在 SharePoint Server 2016 和 SharePoint 2013 中發佈服務應用程式。Summary: Learn how to publish a service application in SharePoint Server 2016 and SharePoint 2013.

在 SharePoint Server 中,您可以跨伺服器陣列發佈服務應用程式,以便於透過遠端連線使用。In SharePoint Server, some service applications can be published across farms and thereby be made available over remote connections.

開始這項作業之前,請參閱跨 SharePoint Server 伺服器陣列共用服務應用程式中有關必要條件的資訊。Before you begin this operation, review Share service applications across farms in SharePoint Server for information about prerequisites.

使用管理中心發佈服務應用程式Publish a service application by using Central Administration

使用管理中心發佈服務應用程式To publish a service application by using Central Administration

  1. 確認執行此程序的使用者帳戶為 SharePoint 伺服器陣列管理員群組的成員。Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.

  2. 在管理中心內,按一下 [應用程式管理] 及 [管理服務應用程式On Central Administration, click Application Management, and then click Manage service applications.

  3. 按一下包含您要發佈服務應用程式的列。您將可以使用功能區上的命令。Click the row that contains the service application that you want to publish. Commands on the ribbon become available.

  4. 在功能區] 上按一下 [發佈]。On the ribbon, click Publish.

  5. 在 [發佈服務應用程式] 對話方塊中執行下列工作:In the Publish Service Application dialog box do the following tasks:

    • 從下拉式清單中選取您想連線類型Select the Connection Type that you want from the drop-down list.

    • 如果您想要可供遠端伺服器陣列的服務應用程式,請選取發佈至其他伺服器陣列此服務應用程式核取方塊。If you want the service application to be available to remote farms, select the check box for Publish this Service Application to other farms.

    • 建議您使用<在 SharePoint Server 中交換伺服器陣列之間的信任憑證>中的指示在兩個伺服器陣列之間建立信任關係。We recommend that you use the instructions in Exchange trust certificates between farms in SharePoint Server to establish trust between the two farms.

    • 複製發佈的 URL 至 [記事本] 或其他文字編輯器。您必須提供此 URL 給遠端伺服器陣列,才能將遠端伺服器陣列連線至發佈的服務應用程式。URL 與下列相似:Copy the Published URL into Notepad or another text editor. You must provide this URL to remote farms to connect the remote farms to the published service application. The URL will be similar to the following:

      urn:schemas-microsoft-com:sharepoint:service:9c1870b7ee97445888d9e846519cfa27#authority=urn:uuid:02a493b92a5547828e21386e28056cba&authority=https://ua_powershell:32844/Topology/topology.svcurn:schemas-microsoft-com:sharepoint:service:9c1870b7ee97445888d9e846519cfa27#authority=urn:uuid:02a493b92a5547828e21386e28056cba&authority=https://ua_powershell:32844/Topology/topology.svc

  6. 您可以選擇性地提供描述性文字與將會看到的遠端伺服器陣列管理員的網頁連結。指定您想要的出版物選項之後,按一下 [發佈服務應用程式的[確定]You can optionally provide descriptive text and a link to a Web page that will be visible to administrators of remote farms. After you have specified the publication options that you want, click OK to publish the service application.

使用 Microsoft PowerShell 發佈服務應用程式Publish a service application by using Microsoft PowerShell

使用 PowerShell 發佈服務應用程式To publish a service application by using PowerShell

  1. 確認您具備下列成員資格:Verify that you have the following memberships:

    • SQL Server 執行個體上的 securityadmin 固定伺服器角色。securityadmin fixed server role on the SQL Server instance.

    • 所有要更新之資料庫上的 db_owner 固定資料庫角色。db_owner fixed database role on all databases that are to be updated.

    • 正在執行 PowerShell Cmdlet 之所在伺服器上的系統管理員群組。Administrators group on the server on which you are running the PowerShell cmdlets.

      系統管理員可以使用 Add-SPShellAdmin Cmdlet 授與使用 SharePoint Server Cmdlet 的權限。An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint Server cmdlets.

      注意

      [!附註] 如果您不具備上述權限,請連絡安裝程式系統管理員或 SQL Server 系統管理員要求權限。如需 PowerShell 權限的其他資訊,請參閱 Add-SPShellAdminIf you do not have permissions, contact your Setup administrator or SQL Server administrator to request permissions. For additional information about PowerShell permissions, see Add-SPShellAdmin.

  2. 啟動 SharePoint 管理命令介面。Start the SharePoint Management Shell.

  3. 在 PowerShell 命令提示字元處,輸入下列命令:At the PowerShell command prompt, type the following command:

    Publish-SPServiceApplication -Identity <ServiceApplicationGUID>
    

    如果您不知道服務應用程式的 GUID,可以使用下列 PowerShell Cmdlet 列出伺服器陣列中所有的服務應用程式及其 GUID:If you do not know the GUID of the service application, you can use the following PowerShell cmdlet to list all service applications in the farm, together with their GUIDS:

    Get-SPServiceApplication
    
  4. 若要檢視發佈的服務應用程式負載平衡器 URL,請輸入下列命令並記錄輸出:To view the published service application load balancer URL, type the following command and record the output:

    Get-SPTopologyServiceApplication
    

    所有連線遠端伺服器陣列都需要此命令所產生的資訊。Any connecting remote farms will need the information that is generated by this command.

另請參閱See also

其他資源Other Resources

發佈 SPServiceApplicationPublish-SPServiceApplication

Get-spserviceapplicationGet-SPServiceApplication

Get-sptopologyserviceapplicationGet-SPTopologyServiceApplication