title: How to save values in Powershell array
body: <p>I have a below code. I can't save backupmodules details for all the pool in Pools file in variable b.
  When I am generating output of variable b, it is giving me the output for only last pool in pools.
  Is there any way (like arrays), which can be used to save backupmodule details for all the pool in pools in variable b?
  Please help!!</p>
  
  <pre><code>$pools= Get-Content -Path "F:\Scripts\Pools.txt"
  foreach ($pool in $pools){
  $a = get-csbackupservicestatus -poolfqdn "$pool"
  $b=$a.backupModules
  $x= $pool
  }
  $b
  </code></pre>