title: Is there a way to center text in PowerShell
body: <p>How can we center text in PowerShell? <code>WindowWidth</code> doesn't exist apparently, so is there a way somehow to keep the text centered?</p>
  
  <p>We want this output :</p>
  
  <pre><code>    *
     ***
    *****
   *******
  </code></pre>
  
  <p>So I wrote</p>
  
  <pre><code>for ($i=1; $i -le 7; $i+=2)
  {
    write-host("*" * $i)
  }
  </code></pre>
  
  <p>But we get </p>
  
  <pre><code>*
  ***
  *****
  *******
  </code></pre>