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

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

1 Answer 1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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