title: Powershell - forward slash inside string
body: <p>As far as I know the forward slash isn't a special character in PowerShell, but in this particular situation the forward slash causes a problem.</p>
  
  <pre><code>Write-Host $([DateTime]::Now.ToString("MM/dd yyyy"))
  </code></pre>
  
  <p>In this case <code>ToString</code> ignores the custom date format (probably because it can't parse it) and outputs date in the default format.</p>
  
  <p>I know how to solve the problem - I can escape the forward slash with a backward slash <code>"MM\/dd yyyy"</code>, but I'd like to know why it is necessary.</p>