0

How can I get the list of broken link of one drive by Powershell script? I have got the copy link Url by

 $linkShortCut = [Microsoft.SharePoint.Client.Web]::CreateAnonymousLink($ctxClient, $itemUrl, $false)
                        $ctxClient.ExecuteQuery() 

But could verify whether the link is broken or not?

1 Answer 1

0

Possible but rather complicated.

You can check out this article from Pieter Veenstra describing how to use PowerShell to check broken links in SPO:

Office 365 – Check your site for broken links in SharePoint Online – Part 1.

Office 365 – Check your site for broken links in SharePoint Online – Part 2.

1
  • This don't help me anyway. I have Link copy the "help.docx" document Url form abc oneDrive and paste this copy Link Url to xyz oneDrive. Then I deleted the "help.docx" of the source abc oneDrive. Then I used the below script: try { if ((invoke-webrequest "xyz-my.sharepoint.com/:u:/g/personal/…" -DisableKeepAlive -UseBasicParsing -Method head).StatusCode -ne 200){ Write-Host “Broken link:” $value.Url } } catch { Write-Host “Broken link:” $value.Url } In this case I don't get Broken link. Jun 8, 2020 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.