title: Dataset Variable in Powershell
body: <p>It's the first time I use powershell and I try to print data from a dataset : </p>
  
  <p>I stored the data of an sql table into a dataset then I tried that (I found that code on another topic): </p>
  
  <pre><code>foreach ($Row in $Dataset.Tables.Rows)
           { 
            write-host "$($Row[0])"
            write-host "$($Row[1])"
  
  
          }
  </code></pre>
  
  <p>and it prints me the first 2 columns and the dataset, it seems normal but when I try that : </p>
  
  <pre><code>foreach ($Row in $Dataset.Tables[0].Rows)
           { 
            write-host "$($Row[0])"
            write-host "$($Row[1])"
  
  
          }
  </code></pre>
  
  <p>I got the exact same thing for the ouput despite the "Tables[0]" instead of "Tables",  Why do we need the variable "Table" ? </p>
  
  <p>Thank you very much for your answers </p>