Get-SPManagedPath

傳回所有符合指定準則的受管理路徑。

Syntax

Get-SPManagedPath
   [[-Identity] <SPPrefixPipeBind>]
   [-HostHeader]
   [-AssignmentCollection <SPAssignmentCollection>]
   [<CommonParameters>]
Get-SPManagedPath
   [[-Identity] <SPPrefixPipeBind>]
   -WebApplication <SPWebApplicationPipeBind>
   [-AssignmentCollection <SPAssignmentCollection>]
   [<CommonParameters>]

Description

This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet parameter sets.

Get-SPManagedPath Cmdlet 會針對 Web 應用程式、網站集合或所有主機名稱網站集合,傳回符合所提供身分識別的 SharePoint 受控路徑。 如果未提供 Identity 參數,則會傳回指定範圍的所有受控路徑。

主機名稱網站 (不論它們包含在其中的 Web 應用程式,) 共用一組受控路徑。 使用 HostHeader 參數可傳回主機命名網站集合範圍的受控路徑。

如需適用於 SharePoint 產品的 Windows PowerShell 權限及最新資訊,請參閱線上文件 SharePoint Server Cmdlet

範例

--------------範例 1-----------------

Get-SPManagedPath -WebApplication https://sitename

此範例會傳回指定 Web 應用程式的所有 Managed 路徑。

--------------範例 2-----------------

Get-SPManagedPath -identity "Sites" -HostHeader

此範例會從主機名稱稱為網站集合範圍的受控路徑取得 Sites 受控路徑。

參數

-AssignmentCollection

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

-HostHeader

如果提供,傳回的受控路徑會用於伺服器陣列中主機名稱的月臺。

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

-Identity

指定要傳回之受管理路徑的 URL 或 GUID。

此類型必須是格式為 https://server_name 的有效 URL,或有效的 GUID (例如 12345678-90ab-cdef-1234-567890bcdefgh)。

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

-WebApplication

指定要從中取得受管理路徑之 Web 應用程式的 URL 或 GUID。

此類型必須是格式為 https://server_name 的有效 URL,或有效的 GUID (例如 12345678-90ab-cdef-1234-567890bcdefgh)。

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