title: Cannot index into a null array.error with Sharepoint 2010
body: <p>I'm trying to use the script below to get some data out from a list.
  I'm using it for my Sp 2007 and it workd but when using it under SP 2010 i get the error.
  Any ideas.
  THanks</p>
  
  <pre><code>Cannot index into a null array.
  At \64284ccd-adc9-4ae4-be4c-0fcd744be7c1.ps1:12 char:19
  +     Title = $item[ &lt;&lt;&lt;&lt; "Title"]
      + CategoryInfo          : InvalidOperation: (Title:String) [], RuntimeException
      + FullyQualifiedErrorId : NullArray
  
  
  
  [System.reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
  $site    =     new-object Microsoft.SharePoint.SPSite("http://mysite/Intranet")                                                       
  
  $web     = $site.rootweb                                                                                               
  $list    =    $web.Lists["Comms"]
  
  $Responses = @()
  
  
  foreach ($item in $list.items) {
  #$list.Items | foreach {
  $obj = New-Object PSObject -Property @{
      Title = $item["Title"]
  
  }
  $obj |select-object Title
  $Responses += $obj
  }
  Write-Host $Response
  </code></pre>