SharePoint Online - reindex list
-
08-02-2021 - |
Frage
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.
Lösung
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?
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit sharepoint.stackexchange