title: Upload files to One Drive using Powershell
body: <p>I am following below to upload files to onedrive using powershell. 
  <a href="http://www.powershellmagazine.com/2014/04/07/using-the-windows-live-apis-from-powershell/" rel="nofollow">http://www.powershellmagazine.com/2014/04/07/using-the-windows-live-apis-from-powershell/</a></p>
  
  <pre><code>Invoke-RestMethod -Uri $Uri -Method Put -InFile $Path
  </code></pre>
  
  <p>where is a full path to a file </p>
  
  <pre><code>$Path= "C:\SkyDrive/ServerBackups/Webs/Webs/test.txt"
  </code></pre>
  
  <p>and 
  <code>$Uri = "https://login.live.com/oauth20_desktop.srf?code=XXXXXX</code></p>
  
  <p>throws a (404) Not found error.</p>