title: Error while executing PowerShell code
body: <p>My code is not printing the value stored in the array, it is printing <code>System.Collections.Hashtable[$i]</code>.</p>
  
  <pre><code>$text = Read-Host
  $id = @{}
  for ($i=0; $i -le $text; $i++)
  {
      $id[$i] = Read-Host
  }
  for ($i=0; $i -le $text; $i++)
  {
      Write-Host $id[$i] 
  }
  </code></pre>
  
  <p>Ouput:</p>
  
  <pre>
  PS C:\Users\mifi>.\1.ps1
  2
  Keshav
  kk
  kk
  System.Collections.Hashtable[0]
  System.Collections.Hashtable[1]
  System.Collections.Hashtable[2]
  </pre>
  
  <p><a href="https://i.stack.imgur.com/VrBSm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VrBSm.png" alt="This is the Screenshots of the Ouput"></a></p>
  
  <p>Whenever I was running this code the Output results in the above form.</p>