title: Controlling column widths with Format-Table
body: <p>I am trying to get the last reboot time of some PCs from a list. When I use </p>
  
  <pre><code>foreach ($pc in $pclist) {
    Get-CimInstance -ClassName win32_operatingsystem -ComputerName $pc |
      select csname, lastbootuptime 
  }
  </code></pre>
  
  <p>The output comes as following.</p>
  
  <pre>csname       lastbootuptime
  ------       --------------
  CONFA7-L1-1A 7/15/2016 9:55:16 AM
  CONFA7-L1-1F 5/31/2016 8:51:46 AM
  CONFA7-L1-1G 6/18/2016 11:09:15 AM
  CONFA7-L1... 6/26/2016 5:31:31 PM
  CONFA7-L3... 7/24/2016 3:48:43 PM</pre>
  
  <p>Which is neat, but if the PC name is long, I am unable to see the full name. 
  So I pipelined <code>Format-Table</code>:</p>
  
  <pre><code>Get-CimInstance -ClassName win32_operatingsystem -ComputerName $pc |
    select csname, lastbootuptime |
    Format-Table  -HideTableHeaders 
  </code></pre>
  
  <p>And this is what I get:</p>
  
  <pre>CONFA7-L1-1A 7/15/2016 9:55:16 AM
  
  
  
  CONFA7-L1-1E 7/21/2016 12:58:16 PM
  
  
  
  CONFA7-L1-1F 5/31/2016 8:51:46 AM</pre>
  
  <p>There are two problems here. </p>
  
  <ol>
  <li><p>There is no heading. If I remove <code>-HideTableHeaders</code> there will be heading for every output which is not required.</p></li>
  <li><p>There is a lot of white spaces in between.</p></li>
  </ol>
  
  <p>Basically I just need to get an output similar to the first one, but without truncating the full names. How can I fix these?</p>