posts
If you try get-pnpfile using full path, the url needs to be encoded. There are loads of issues with special charaters like [ ] becomes %5B and %5D in
$encodedfileUrl = [System.Web.HttpUtility]::UrlPathEncode($fileUrl) $item = Get-PnPFile -Url $encodedfileUrl -AsListItem -ErrorAction Stop Log-Message "Retrieved file: $fileUrl" "Success" Those two methods don’t handle [ ] [System.Web.HttpUtility]::UrlPathEncode(…): obsolete and doesn’t encode [/]. [System.Uri]::EscapeUriString(…): does not encode [ and ] and may leave other characters unencoded.
posts
Get-PnPSearchCrawlLog -ContentSource Sites -Filter $filte … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Error: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.. Make sure you are | granted access to the crawl log via the SharePoint search admin center at | https://<tenant>-admin.sharepoint.com/_layouts/15/searchadmin/crawllogreadpermission.aspx 🚀 Kudos to Kinga Kazala for contributing a valuable enhancement to #PnPPowerShell by adding the -IncreaseRequestTimeout parameter to the Get-PnPSearchCrawlLog cmdlet.
This improvement helps address the common timeout error: “The request was canceled due to the configured HttpClient.