Publish-SPServiceApplication

共享服务器场外指定的本地服务应用程序。

语法

Publish-SPServiceApplication
       [-Identity] <SPServiceApplicationPipeBind>
       [-AssignmentCollection <SPAssignmentCollection>]
       [-Confirm]
       [-Description <String>]
       [-InfoLink <Uri>]
       [-WhatIf]
       [<CommonParameters>]

说明

Publish-SPServiceApplication cmdlet 在场外发布由 Identity 参数指定的本地服务应用程序。

有关适用于 SharePoint 产品的 Windows PowerShell 的权限和最新信息,请参阅 SharePoint Server cmdlet

示例

------------------示例-----------------------

Publish-SPServiceApplication 053c34be-d251-488c-8e94-644eae94da26 -Description "Connect to this TestServiceApplcation of you want to use FeatureA in your farm" -InfoLink https://testurl

此示例将服务应用程序发布到另一个服务器场。

服务应用程序 GUID 对于每个服务器场来说是唯一的。 可以运行 Get-SPServiceApplication cmdlet 以查看服务应用程序的 GUID,然后将 cmdlet 中的结果Get-SPServiceApplication用于其他 SPServiceApplication cmdlet;例如。 Grant-SPServiceApplication

参数

-Confirm

执行命令前,看到确认提示。 有关详细信息,请键入以下命令:get-help about_commonparameters

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Identity

指定在服务器场外要共享的服务应用程序的 GUID。

键入的值必须为 12345678-90ab-cdef-1234-567890bcdefgh 形式的有效 GUID。

Type:SPServiceApplicationPipeBind
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-InfoLink

Specifies the link to more information about the service application to share outside the farm. If no link is specified, no link is made available.

该类型必须是有效的 URL(在窗体 https://server_name/Site_Name/page_name中)。

Type:Uri
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-WhatIf

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-工作分配

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type:SPAssignmentCollection
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-描述

描述要在服务器场外共享的服务应用程序。 如果未指定值,则值保留为空。

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition