0

I have this code :

$web = Get-SPWeb http://mysite 
ForEach($list in $web.Lists)
{

if($list.BaseType -eq "DocumentLibrary")
{
    Write-Host $list.Fields
    if($list.Fields.ContainsField("marking") -eq $true)
    {
        Write-Host "found" $list.Title
    }
}
}

I want it to out put the URL of the document library

  • did you try this one $List.DefaultViewUrl? – Waqas Sarwar MVP Jun 9 '14 at 13:54
  • can you put that as an answer as that is what I want – bimbob Jun 9 '14 at 14:01
  • i just post it as anwser – Waqas Sarwar MVP Jun 9 '14 at 14:15
0

There is another property of List called DefaultViewURL, try that one.

 $List.DefaultViewUrl

Here is MSDN Article.

http://msdn.microsoft.com/en-us/library/office/ee557895(v=office.14).aspx

| improve this answer | |

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.