title: Create Powershell Hashtable and Export to Excel
body: <p>I'm trying to get some information from a hash table, when it displays on the screen, it all outputs correctly. When I try to export it to excel I get some strange output.</p>
  
  <p>The code I use is </p>
  
  <pre><code>$hash = @{}
  
  $disk = Get-AzureRmDisk
  foreach ($d in $disk) {
      $hash.Add(($d).Id.Split("/")[-1],($d).Id.Split("/")[-5])
  }
  
  $hash | Export-Csv C:\managed\disks.csv
  </code></pre>
  
  <p>Still learning hashtables so excuse the simple approach :)</p>
  
  <p>Thanks in advance </p>