title: PowerShell Code Tidy or Reformat?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2987176/is-there-a-powershell-code-formatter-pretty-printer">Is there a PowerShell code formatter / pretty printer?</a>  </p>
  </blockquote>
  
  
  
  <p>Does anyone know of a tool that you can use to re-format/tidy Powershell code:-</p>
  
  <p>Eg:-</p>
  
  <pre><code>if ($c -eq "Cat") 
  {
  $a="Bubble" 
  }
  else
  {
  $a="Trouble"
  }
  Write-Host $a
  </code></pre>
  
  <p>To:-</p>
  
  <pre><code>if ($c -eq "Cat") 
  {
      $a="Bubble" 
  }
  else
  {
      $a="Trouble"
  }
  Write-Host $a
  </code></pre>
  
  <p>ie, tabbing If Statements etc, I know they was tools to do it with VB but I haven't seen any for Powershell yet?</p>