문제

I would need to manually call re-index for a SP List in SP Online like once/twice a day.

Is there any PowerShell/ MS Graph solution for this?

This list is having a lot of items on it that are being deleted / created on daily basis and I need search to be working with current items and not point to the old deleted ones.

I need to implement that into a code. Solution of clicking the button in advanced settings is not desired.

도움이 되었습니까?

해결책

Below is the PnP PowerShell to re-index a SharePoint Online list or library

#Config Variables
$SiteURL = "https://crescenttech.sharepoint.com"
$ListName="Projects"

#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential)

#Request Reindex
Request-PnPReIndexList -Identity $ListName

Reference: SharePoint Online: How to Reindex a List or Document Library using PowerShell?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top