Get-PnPSearchCrawlLog

Returns entries from the SharePoint search crawl log

Syntax

Get-PnPSearchCrawlLog
   [-LogLevel <LogLevel>]
                        [-RowLimit <Int>]
                        [-Filter <String>]
                        [-ContentSource <ContentSource>]
                        [-StartDate <DateTime>]
                        [-EndDate <DateTime>]
                        [-Web <WebPipeBind>]
                        [-Connection <SPOnlineConnection>]

Examples

------------------EXAMPLE 1------------------

Get-PnPSearchCrawlLog

Returns the last 100 crawl log entries for site content.

------------------EXAMPLE 2------------------

Get-PnPSearchCrawlLog -Filter "https://<tenant>-my.sharepoint.com/personal"

Returns the last 100 crawl log entries for OneDrive content.

------------------EXAMPLE 3------------------

Get-PnPSearchCrawlLog -ContentSource UserProfiles

Returns the last 100 crawl log entries for user profiles.

------------------EXAMPLE 4------------------

Get-PnPSearchCrawlLog -ContentSource UserProfiles -Filter "mikael"

Returns the last 100 crawl log entries for user profiles with the term "mikael" in the user principal name.

------------------EXAMPLE 5------------------

Get-PnPSearchCrawlLog -ContentSource Sites LogLevel Error -RowLimit 10

Returns the last 10 crawl log entries with a state of Error for site content.

------------------EXAMPLE 6------------------

Get-PnPSearchCrawlLog -EndDate (Get-Date).AddDays(-100)

Returns the last 100 crawl log entries for site content up until 100 days ago.

Optional Parameters

-Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type:SPOnlineConnection
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-ContentSource

Content to retrieve (Sites, User Profiles). Defaults to Sites.

Type:ContentSource
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-EndDate

End date to stop getting entries from. Default to current time.

Type:DateTime
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Filter

Filter to limit what is being returned. Has to be a URL prefix for SharePoint content, and part of a user principal name for user profiles. Wildcard characters are not supported.

Type:String
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-LogLevel

Filter what log entries to return (All, Success, Warning, Error). Defaults to All

Type:LogLevel
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-RowLimit

Number of entries to return. Defaults to 100.

Type:Int
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-StartDate

Start date to start getting entries from. Defaults to start of time.

Type:DateTime
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Web

This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.

Type:WebPipeBind
Position:Named
Accept pipeline input:False
Accept wildcard characters:False