title: Get a collection of items in document library/list
body: <p>I'm new to Powershell. What I'm trying to do is get a list of all the documents in a document library. I have an absolute URL of the document library I want to process, for example.</p>
  
  <p>Essentially what I want is a reference to the document library so I can send some CAML queries to it.</p>
  
  <p><code>http://sharepoint2013/sites/superdupersite/shared%20documents</code></p>
  
  <pre><code>Add-PSSnapin Microsoft.SharePoint.Powershell
  
  $items = Get-SPList "http://sharepoint2013/sites/superdupersite/shared%20documents"
  
  foreach ($item in $item) {
         #process
  }
  </code></pre>
  
  <p>But it doesn't seem to work. How can I do this in powershell?</p>