Sharepoint Throttling how to avoid #4582
Unanswered
temporaldoom
asked this question in
Q&A
Replies: 1 comment
-
As far as I know PnP.PowerShell has built in retry actions when you get throttled. It takes the 429 HTTP result and takes the value of Retry-After I think. Or just some random time. I have lots of scripts were I get throttled and PnP.PowerShell resumes my script after a couple of seconds, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been tasked with finding large version files across our tenant and their actual allocated file size, for this I need to use get-pnproperty -versions.
My problem is however that I'm invariably going to end up with throttling even if I run this overnight. my script does this
get-pnplistitem -List $list.Title -PageSize 5000 -Fields "FileLeafRef", "_UIVersion" , "File_x0020_Size" | where-object {$_["_UIVersion"] -ne 1 -and $_["_UIVersion"] -ne 512 }
this retrieve all files in a list with a version greater than 1 (to my knowledge)
I then iterate through these making 2 request to get the file size
$File = Get-PnPProperty -ClientObject $item -Property File
$Versions = Get-PnPProperty -ClientObject $File -Property Versions
the filtering works to a certain degree but I know i'm going to get throttled at some point, the only thing I can think of is putting in some kind of counter and pausing for x seconds after I've processed x requests.
Anyone else got any ideas?
Beta Was this translation helpful? Give feedback.
All reactions