Sharepoint Online Page Links

ShurondaHawkins-0941 1 Reputation point
2022-05-11T19:01:13.533+00:00

We are in the process of moving data from file shares within our network up to Sharepoint. We have a Sharepoint site, that contains a Sharepoint page with links to information. The links are pointed to locations within file shares on the network. I would like to know if there is a way to extract the link's location and link name from the Sharepoint page?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,923 questions
{count} votes

1 answer

Sort by: Most helpful
  1. CaseyYang-MSFT 10,451 Reputation points
    2022-05-12T10:58:52.217+00:00

    Hi @ShurondaHawkins-0941 ,

    Did you want to export links you added to the page or you want to export some file links in SharePoint?

    Per my research there is no available way to export links and link name if you want to export links you add to the page.

    You could use following PowerShell commands if you just want to export some file links in SharePoint.

    PowerShell:

     #Set Variables  
     $SiteURL= "https://tenant.sharepoint.com/sites/Team1"  
     $ListName="Documents"  
     $prefix="https://tenant.sharepoint.com"  
          
     #Connect to PNP Online  
     Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential)  
           
     #Get All Items from the specific folder - In batches of 500  
     $ListItems = Get-PnPListItem -List $ListName -FolderServerRelativeUrl "/sites/Team1/Shared%20Documents/Folder1027" -PageSize 500  
           
     #Loop through List Items and Get File URL  
     $Results=@()  
     ForEach($Item in $ListItems)  
     {  
         $Results += New-Object PSObject -Property @{  
         FileName =   $Item.FieldValues['FileLeafRef']  
         FileURL = $prefix + $Item.FieldValues['FileRef']  
         }  
     }  
     $Results   
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.