title: Robocopy as another user
body: <p><strong>Problem:</strong> Robocopy not launching as another user in <code>Start-Process</code></p>
  
  <p>The script works fine when running on an account that has the permissions for both file locations but it just doesnt seem to be accepting the <code>-credential</code> param.</p>
  
  <p>Unsure if my formatting is incorrect or if I am doing something wrong.</p>
  
  <pre><code># Create Password for credential
  $passw = convertto-securestring "Password" -asplaintext –force
  # Assembles password into a credential
  $creds = new-object -typename System.Management.Automation.PSCredential -argumentlist "DOMAIN\Username", $passw
  # Select a source / destination path, can contain spaces
  $Source = '\\Source\E$\Location'
  $Destination = '\\Destination\Location Here'
  # formats the arguments to allow the credentials to be wrapped into the command
  $RoboArgs = "`"$($Source)`" `"$($Destination)`"" + " /e /Copy:DAT"
  # Started Robocopy with arguments and credentials
  Start-Process -credential $creds Robocopy.exe -ArgumentList $RoboArgs -Wait
  </code></pre>