none
PNP Powershell 429 Incremental back off and retry RRS feed

  • Question

  • I want to use PNP Powershell for sharepoint online. 
    And I want to write code for Incremental back off and retry(Error 429 Too Many Requests).
    But I can't find the sample code for pnp powershell.

    Please teach me how to add [Incremental back off and retry] code to the next code.

        foreach ($i in $sitecollection) {
            try {
                Connect-PnpOnline -Url $i.url -Credentials $credential
                $currentSubwebs = Get-PnPSubWebs -Recurse
                foreach ($j in $currentSubwebs) {
                    "," + $j.Url | Out-File $LogFile -Encoding UTF8 -Append
                }
            }
            catch{
                "," + "," + $i.Owner + "," + $i.Template + "," + $error[0] + "" | Out-String | Out-File $LogFile -Encoding UTF8 -Append
                Continue
            }
        }

    Friday, August 10, 2018 1:31 AM