You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi everyone, I have made adjustments to suit the recent removal of PnP Management Shell app registration. I have added my own app, and I can get list items, the problem is that it does not return all 1990 of them, only about 220. a snippet of the code is below. I am using version 2.12.o on powershell V 7. The sample output shows that it is stopping at ID 1360 and it is skipping a lot of rows on the way there. Any assistance is appreciated.
Write-Host "Total items retrieved without filters: $Count"
Sample output:
620 Tirtha Raj
621 Kamal
622 Khem Bahadur
623 Sin
627 Isa
717 Lisa
718 Annika
1033 Kim
1123 Sipping
1124 Tony
1125 Patricia
1360 External
Total items retrieved without filters: 229
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
hi everyone, I have made adjustments to suit the recent removal of PnP Management Shell app registration. I have added my own app, and I can get list items, the problem is that it does not return all 1990 of them, only about 220. a snippet of the code is below. I am using version 2.12.o on powershell V 7. The sample output shows that it is stopping at ID 1360 and it is skipping a lot of rows on the way there. Any assistance is appreciated.
$site = "https://xxxxxxxxxxxxxx.sharepoint.com/Group/IT/"
Connect-PnPOnline -Url $Site -Interactive -ClientId "xxxxxxxxxxxxxxxxxxxxxxxx" #Uses MFA
$listId = "XXXXXXXXXXXXXXXXXXXXXXX"
$ListItems = Get-PnPListItem -List $listId
$Count = $ListItems.Count
Get-PnPListItem -List $ListName -PageSize 2000 -ScriptBlock { Param($items) $items.Context.ExecuteQuery()} | ForEach-Object {
$_ #This is the list Item
}
foreach ($listItem in $ListItems) {
$ID = $listItem["ID"]
$FName = ($listItem["First_x0020_Name"]).Trim()
Write-Host "$ID $FName"
}
Write-Host "Total items retrieved without filters: $Count"
Sample output:
620 Tirtha Raj
621 Kamal
622 Khem Bahadur
623 Sin
627 Isa
717 Lisa
718 Annika
1033 Kim
1123 Sipping
1124 Tony
1125 Patricia
1360 External
Total items retrieved without filters: 229
Beta Was this translation helpful? Give feedback.
All reactions