title: Export all the columns with their data values in a list
body: <p>I have to export all the columns in a particular SharePoint list along with the data contained in the columns.</p>
  
  <p>I am currently able to get all column names but not data. Need help with that. Below is my code.</p>
  
  <pre><code>$url = "$url"
  $listName = "$list"
  $path ="c:\ColumnsOfList.csv"
  
  $web = Get-SPWeb $url
  $list = $web.Lists.TryGetList($listName)
  $list.ContentTypes | % { $_.FieldLinks } | select Name |  Export-Csv -Path $path
  </code></pre>