Get-SPAppInstance

返回应用程序实例的元数据。

语法

Get-SPAppInstance
   -Identity <SPAppInstance>
   [-AssignmentCollection <SPAssignmentCollection>]
   [<CommonParameters>]
Get-SPAppInstance
   -Site <SPSitePipeBind>
   [-AssignmentCollection <SPAssignmentCollection>]
   -AppInstanceId <Guid>
   [<CommonParameters>]
Get-SPAppInstance
   [-App <SPApp>]
   [-AssignmentCollection <SPAssignmentCollection>]
   -Web <SPWebPipeBind>
   [<CommonParameters>]

说明

此 cmdlet 包含多个参数集。 您可以只使用来自一个参数集的参数,也可以不合并来自不同参数集的参数。 若要详细了解如何使用参数集,请参阅 Cmdlet 参数集

使用Get-AppInstance cmdlet 获取在 SPWeb 对象上安装的应用实例的集合。

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

示例

-----------示例 1-----------

Get-SPAppInstance -Web https://localhost

如果安装了多个应用, https://localhost则此示例返回集合。 如果只安装了一个应用,则返回一个对象。

-----------示例 2-----------

Get-SPAppInstance -AppInstanceId $instance.Id

此示例返回应用实例的 ID。

参数

-App

指定应用。

此参数返回应用的所有实例的元数据。

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

-AppInstanceId

指定要显示的应用实例 ID。

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

-Identity

指定要为其查找元数据的应用实例。

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

-Site

将查询范围设置为站点。

不包括子网站。

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

-Web

指定 SPWeb 对象。

Type:SPWebPipeBind
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