trying to bulk check in files in a list containing over 400K files tried without CAML query, but it takes forever. with the query, getting threshold error even with rowlimit. is there any other way?
$Result = @() #Result array
#Provide SPO Site URL
$SiteUrl = "https://contoso"
#Provide List/Document Library name
$ListName = "list"
#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -interactive
#CAML Query to filter only Checked-out files
$CAMLQuery = "
<View Scope='RecursiveAll'>
<Query>
<Where>
<IsNotNull><FieldRef Name='CheckoutUser' /></IsNotNull>
</Where>
</Query>
<RowLimit>1000</RowLimit>
</View>"
#Query All Checked out files
$ListItems = Get-PnPListItem -List $ListName -PageSize 1000 -Query $CAMLQuery
$i = 0;
$TotalFiles = $ListItems.Count
#Iterate checked-out files one by one and check-in
.......