title: Error: [System.Management.Automation.PSObject] does not contain a method named 'op_Addition
body: <p>Hi I am trying to run a script to get information from all the datastores.</p>
  
  <p>The code script I am running is giving an error:</p>
  
  <blockquote>
  <pre><code>At C:\Users\Administrator\Desktop\Scripts\test.ps1:125 char:2
  +     $allstoreinfo += $storeinfo
  +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : InvalidOperation: (op_Addition:String) [], RuntimeException
      + FullyQualifiedErrorId : MethodNotFound
  </code></pre>
  </blockquote>
  
  <p>The script is a simple for loop:</p>
  
  <pre><code>$datastores = Get-Datastore
  $allstoreinfo = @()
  
  foreach($store in $datastores){
  
  $storeinfo = "" | Select Name, FileSystem, Type, CapacityGB, FreeSpaceGB
  
  $datastoreview = get-datastore -Name $store.Name | Get-View | select -ExpandProperty summary
  
  $CapacityGB = [math]::round($datastoreview.Capacity/1GB,2)
  
  $FreeSpaceGB = [math]::round($datastoreview.FreeSpace/1GB,2)
  
  $ProvisionedGB = [math]::round(($datastoreview.Capacity - $datastoreview.FreeSpace + $datastoreview.Uncommitted)/1GB,2)
  $storeinfo.Name = $store.Name
  
  $storeinfo.FileSystem = $store.FilesystemVersion
  
  $storeinfo.Type = $store.Type
  
  $storeinfo.CapacityGB = $CapacityGB
  
  $storeinfo.FreeSpaceGB = $FreeSpaceGB
  
  $allstoreinfo += $storeinfo
  
  }
  
  Write-Host "---------------------------------"
  
  $allstoreinfo | Select Name, FileSystem, Type, CapacityGB, FreeSpaceGB
  
  Write-Host "---------------------------------"
  </code></pre>