title: PowerShell: How can I suppress the error if file alreadys exists for "mkdir" command?
body: <p>Consider:</p>
  
  <pre><code>PS Y:\&gt; mkdir  C:/dog
  
  
      Directory: C:\
  
  
  Mode                LastWriteTime     Length Name
  ----                -------------     ------ ----
  d----         11/7/2013  10:59 PM            dog
  
  
  PS Y:\&gt; mkdir  C:/dog
  New-Item : Item with specified name C:\dog already exists.
  At line:38 char:24
  +         $scriptCmd = {&amp; &lt;&lt;&lt;&lt;  $wrappedCmd -Type Directory @PSBoundParameters }
      + CategoryInfo          : ResourceExists: (C:\dog:String) [New-Item], IOException
      + FullyQualifiedErrorId : DirectoryExist,Microsoft.PowerShell.Commands.NewItemCommand
  </code></pre>