Get-SPWebPartPack

返回为指定范围安装的 Web 部件包。

语法

Get-SPWebPartPack
   [[-Identity] <String>]
   [-AssignmentCollection <SPAssignmentCollection>]
   [-GlobalOnly]
   [-WebApplication <SPWebApplicationPipeBind>]
   [<CommonParameters>]

说明

The Get-SPWebPartPack cmdlet returns the installed Web Part packages that match the Identity parameter. The scope of results can be narrowed by using the optional WebApplication parameter. The scope does not include any Web Part packages installed in the global assembly cache (GAC) unless the GlobalOnly parameter is used. If this parameter is used, only Web Part packages that have been installed in the GAC are returned.

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

示例

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

Get-SPWebPartPack -WebApplication http://zsharepoint2:80

此示例返回已在本地服务器场中的 80 端口的 Web 应用程序上安装的所有 Web 部件包。

参数

-GlobalOnly

只返回全局程序集缓存 (GAC) 中安装的 Web 部件包。

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

-Identity

指定配置数据库中的 Web 部件包的全称或部分名称。

键入的值必须为 Web 部件包的有效名称,例如 MyWebPartPackage。

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

-WebApplication

Specifies the Web application from which to list Web Part packages. If no Web application is specified, the specified Web Part packages will be returned from all Web applications.

Type:SPWebApplicationPipeBind
Position:Named
Default value:None
Accept pipeline input:True
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