@sns
You could try to use below PnP PowerShell to add 25000 items in the SharePoint list.
$username = "user name "
$password = "password"
$cred = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $userName, $(convertto-securestring $Password -asplaintext -force)
Connect-PnPOnline -Url site collection URL -Credentials $cred
$ListName ="list name"
for($i=0;$i –lt 25001;$i++){
Add-PnPListItem -List $ListName -Values @{"Title" = "test";}
}
I’d like to explain that in SharePoint Online we have a list view threshold limit which is 5000. To learn more, see SharePoint Online software boundaries and limits. When we exceed this limit, it will cause some unexpected behaviors and performance issues. So, we suggest users manage large list referring to the article below:
Manage large lists and libraries in Office 365
If an Answer is helpful, please click "Accept Answer" and upvote it.
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.