Hi @ネパリ サンデャ,
Thank you for posting in this community.
The reason for your problem is that SharePoint Online contains a maximum of 5000 items in a list view.
The reason for your problem is that SharePoint Online contains a maximum of 5000 items in a list view.
Here's a reference to this limitation: "The number of items in this list exceeds the list view threshold" when you view lists in Microsoft 365
For your question, the PnP PowerShell module provides a “PageSize” switch to handle larger lists in batches:
#Parameter
$SiteURL = "https://crescent.sharepoint.com/sites/PMO"
$ListName= "Projects"
#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -Interactive
#Get all list items from list in batches
$ListItems = Get-PnPListItem -List $ListName -PageSize 500
Write-host "Total Number of List Items:" $($ListItems.Count)
#Loop through each Item
ForEach($Item in $ListItems)
{
Write-Host "Id :" $Item["ID"]
Write-Host "Title :" $Item["Title"]
}
Here is the link to the referenced solution
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.