Say I have a list named Links. Is there a way, through .NET and Powershell, to retrieve the URL for this list? In this case, the URL I'm looking for would be "/Lists/Links".


SPList.RootFolder.Url will give you the site relative URL. You might have to add a / to the beginning.

| improve this answer | |
  • 1
    Doesn't work in some situations esp. in PowerShell. I get blank back. The ServerRelativeUrl property helps though. – Rob Nicholson Aug 18 '17 at 9:06
  • Rob Nicholson you r right. its not giving relative url in powershell. As you told ServerRelativeUrl property worked for me. thanks – SP Developer May 9 '18 at 11:22

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.