Set-SPEnterpriseSearchCrawlLogReadPermission

授予用户查看爬网日志信息的权限。

语法

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

说明

只有 Search Service 应用程序管理员才可使用此 cmdlet。

管理员使用 Set-SPEnterpriseSearchCrawlLogReadPermission 该 cmdlet 授予用户查看爬网日志信息的权限。 该管理员可以选择将权限限制为仅从特定租户对日志信息进行爬网。

有关适用于 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 引用的搜索应用程序上 ID 为“00000000-0000-0000-0000-000000000001”的租户查看爬网日志信息。 然后,该示例使用 Set-SPEnterpriseSearchCrawlLogReadPermission cmdlet 将 user1 和 user2 添加到$crawlLogPermission引用的用户列表。

参数

-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

指定应将用户添加到的爬网日志权限列表。

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

Specifies that the users shall be added to the crawl log permissions list within the scope of this tenant only. The type must be a valid GUID of the form 12345678-90ab-cdef-1234-567890bcdefgh.

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

-UserNames

Specifies the user names that shall be granted permission to view the crawl log information Use "domain\username" or "username". When adding several user names, separate names with semi-colons.

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

-工作分配

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