How To Retrieve List URL In SharePoint 2013 Online O365 Using PowerShell

This blogs will helps you to retrive all SubSites under Site Collections in SharePoint online using PowerShell Method.

Steps
  1. Open SharePoint Management Shell.
  2. Copy the below Code and paste it.
  3. Run the Code 
  1. ##########################    
  2.   
  3. #Script  : Below Script will retrieve List Url in SharePoint 2013 Online in Office 365 SharePoint Online   
  4. #Author  : Gowtham Rajamanickam    
  5. #Date    : 21-03-2017  
  6. #Version:1.0    
  7.   
  8. #########################  
  9.   
  10. Function Get-SPOCredentials([string]$UserName,[string]$Password)  
  11. {  
  12.    $SecurePassword = $Password | ConvertTo-SecureString -AsPlainText -Force  
  13.    return New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName, $SecurePassword)  
  14. }  
  15.   
  16. $context = New-Object Microsoft.SharePoint.Client.ClientContext($Url)  
  17. $context.Credentials = Get-SPOCredentials -UserName "Enter Your 0365 user Name " -Password "Enter Your Password Here"  
  18.   
  19. $list = $context.Web.Lists.GetByTitle($listTitle)  
  20. $context.Load($list.RootFolder)  
  21. $context.ExecuteQuery()  
  22.   
  23. $listUrl = $list.RootFolder.ServerRelativeUrl  
  24. Write-Host $listUrl   
Conclusion

Was my Blog helpful?Was it missing content? If so, please let us know what's confusing or missing at the bottom of this page.

Thanks for reading my blogs.
Ebook Download
View all
Learn
View all