title: Format-Table separator
body: <p>By default, PowerShell's Format-Table uses a single space character as a column separator.  Depending on the data, it can result in somewhat of a jumbled mess.</p>
  <p>Is there a way to override that behavior (globally or on a case-by-case basis) and, for example, separate columns with three spaces instead of one?</p>
  <p>Here's a small example.  As you can see, the data just sort of blends together.</p>
  <pre><code>$containers | Format-Table @{n='Id';e={$_.Id.Substring(0, 12)}}, Name, @{n='Created';e={$_.CreatedAtDisplay}}, Status, IPAddress, PID, Platform, @{n='Image';e={$_.ImageName}}, Command
  
  Id           Name        Created          Status      IPAddress        Pid Platform Image     Command
  --           ----        -------          ------      ---------        --- -------- -----     -------
  c311319af3c0 pwsh-nano-1 2021-12-11 15:25 Up 29 hours 192.168.99.43  27248 windows  pwsh-nano &quot;ping -t localhost&quot;
  c911d82df957 pwsh-2      2021-12-05 16:30 Up 3 days   192.168.99.235  5420 windows  pwsh      &quot;ping -t localhost&quot;
  </code></pre>
  <p>Contrast that with the following example where I am using a custom format.ps1xml in which I set the Width of each column a few characters longer than the longest value in my contrived example.  See how much easier it is to consume?  Some folks may appreciate compacted data, and to each his own, but for the purpose of this discussion let's just focus on a solution to the problem as presented.</p>
  <pre><code>$containers | Format-Table
  
  Id               Name             Created            Status           IP Address         PID      Platform   Image            Command
  --               ----             -------            ------           ----------         ---      --------   -----            -------
  c311319af3c0     pwsh-nano-1      2021-12-11 15:25   Up 29 hours      192.168.99.43      27248    windows    pwsh-nano        &quot;ping -t localhost&quot;
  c911d82df957     pwsh-2           2021-12-05 16:30   Up 3 days        192.168.99.235     5420     windows    pwsh             &quot;ping -t localhost&quot;
  </code></pre>
  <p>While it looks nicer, this approach doesn't scale, is inefficient when the values are relatively short, and doesn't achieve the goal when the values are longer than the defined width.  Unless I'm missing something, the obvious solution is that PowerShell should allow for the column separator to be overridden in some way.  I'm hoping that behavior already exists, but I am doubtful since my searches haven't yielded any results and I'm here...</p>
  <p>Is there a way to do this?  If not, are there any decent alternatives to Format-Table that would provide this functionality?</p>