title: Powershell Custom object - not passing foreach variable
body: <p>I'm trying to create a custom object based on server names from a text file. 
  The script I have goes and imports the txt file into a Variable. Then runs a foreach server in the servers variable to create the custom object. I would like to be able to output the object's properties as a table that doesn't include the header info each time. </p>
  
  <p>See script and output below:</p>
  
  <pre><code> $SERVERS = gc c:\servers.txt
  
  
  foreach ($srv in $SERVERS)
  {
      $Obj = New-Object PsObject -Property`
     @{
           Computername = $srv
           SecurityGroup = (Get-QADComputer $srv).memberof
           RebootDay = ((Get-QADComputer $srv).memberof).split(',').split(' ')[2]
           Combined = ((Get-QADComputer $srv).memberof).split(',').split(' ').split('=')[1]
           RebootTime = $obj.combined.substring(0,4)
       }
  
   echo $obj | ft Computername,RebootDay -autosize
  
  }
  </code></pre>
  
  <p>This is the output currently:</p>
  
  <p>Computername  RebootDay</p>
  
  <hr>
  
  <p>SERVER007      Sunday   </p>
  
  <p>Computername  RebootDay</p>
  
  <hr>
  
  <p>SERVER009     Sunday   </p>
  
  <p>Computername  RebootDay</p>
  
  <hr>
  
  <p>SERVER003      Sunday   </p>
  
  <hr>
  
  <p>I'd like it to look more like:</p>
  
  <p>Computername  RebootDay</p>
  
  <hr>
  
  <p>SERVER007     Sunday<br>
  SERVER001     Sunday<br>
  SERVER009     Sunday   </p>