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?

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.

| improve this answer | |
  • 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. – RajeshSharepointGeek Jun 8 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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