title: Get PowerShell to ignore exitcode?
body: <p>I am using <code>robocopy</code> within PowerShell and <code>robocopy</code> returns an exitcode 1 if a file has successfully been copied, which tells PowerShell it failed. Is there a good practice to ignore the error since its not an error?</p>
  
  <pre><code>$source = "$env:buildlocation\Reports\$env:ctrelname\DiskImages\DISK1";
  $target = "$env:builddestination\$env:ctrelver\$env:ctrelname\Reports";
  $robocopyOptions = @('/e', '/r:0', '/np');
  Get-ChildItem -Path $source -Directory -Attributes !Hidden |
      Sort-Object -Property CreationTime |
      ForEach-Object { &amp; robocopy.exe $source $target $robocopyOptions };
  echo $LASTEXITCODE
  </code></pre>