Set-SPEnterpriseSearchCrawlLogReadPermission

授與使用者檢視編目記錄資訊的權限。

Syntax

Set-SPEnterpriseSearchCrawlLogReadPermission
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   [-Identity <CrawlLogReadPermissionPipeBind>]
   [-SearchApplication <SearchServiceApplicationPipeBind>]
   [-Tenant <Guid>]
   [-UserNames <String>]
   [-WhatIf]
   [<CommonParameters>]

Description

只有 Search Service 應用程式管理員可以使用此 Cmdlet。

系統管理員會使用 Cmdlet Set-SPEnterpriseSearchCrawlLogReadPermission 授與使用者檢視編目記錄資訊的許可權。 系統管理員可以選擇限制從特定租使用者編目記錄資訊的許可權。

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

範例

--------------------範例---------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$crawlLogPermission = Get-SPEnterpriseSearchCrawlLogReadPermission -SearchApplication $ssa -Tenant  "00000000-0000-0000-0000-000000000001"
Set-SPEnterpriseSearchCrawlLogReadPermission -Identity $crawlLogPermission -SearchApplication $ssa -UserNames "user1;user2" -Tenant "00000000-0000-0000-0000-000000000001"

此範例會先定義$crawlLogPermission,也就是在$ssa所參考的搜尋應用程式上,有權檢視租使用者中識別碼為 「00000000-0000-00000-000000000001」 之編目記錄資訊的使用者清單。 然後,此範例會使用 Set-SPEnterpriseSearchCrawlLogReadPermission Cmdlet,將 user1 和 user2 新增至$crawlLogPermission所參考的使用者清單。

參數

-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

-Confirm

Prompts you for confirmation before executing the command. For more information, type the following command: 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

指定應新增使用者的編目記錄許可權清單。

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

-SearchApplication

Specifies the search application that contains the crawl log. The type must be a valid GUID, of the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

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

-Tenant

指定使用者只能新增至此租使用者範圍內的編目記錄許可權清單。 此類型必須是格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID。

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

-UserNames

指定應授與檢視編目記錄資訊許可權的使用者名稱使用 「domain\username」 或 「username」。 若要新增數個使用者名稱,請使用分號分隔名稱。

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