title: Remove-Item : Cannot remove item because it is being used by another process
body: <p>The problem is very easy to understand.</p>
  <p>Yesterday I have installed <a href="https://visualstudio.microsoft.com/vs/older-downloads/isolated-shell/" rel="nofollow noreferrer">en_visual_studio_2015_shell_isolated_x86_dvd_9fda4a05.iso</a> and the file is hanging on my Desktop.</p>
  <p><a href="https://i.stack.imgur.com/q2SwZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q2SwZ.png" alt="enter image description here" /></a></p>
  <p>When I try to delete it through <code>Remove-Item .\en_visual_studio_2015_shell_isolated_x86_dvd_9fda4a05.iso</code> the Terminal fires back with the error:</p>
  <pre><code>Remove-Item : Cannot remove item C:\Users\franc\OneDrive\Desktop\en_visual_studio_2015_shell_isolated_x86_dvd_9fda4a05.iso: The process cannot access the file
  'C:\Users\franc\OneDrive\Desktop\en_visual_studio_2015_shell_isolated_x86_dvd_9fda4a05.iso' because it is being used by another process.
  At line:1 char:1
  + Remove-Item .\en_visual_studio_2015_shell_isolated_x86_dvd_9fda4a05.i ...
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : WriteError: (C:\Users\franc\...vd_9fda4a05.iso:FileInfo) [Remove-Item], IOException
      + FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell.Commands.RemoveItemCommand
  </code></pre>
  <p>So I tried to find out what is handling that file:</p>
  <pre><code>$handleOut = handle
  foreach ($line in $handleOut) { 
          if ($line -match '\S+\spid:') {
              $exe = $line
          } 
          elseif ($line -match 'C:\\Users\\franc\\OneDrive\\Desktop\\en_visual_studio_2015_shell_isolated_x86_dvd_9fda4a05.iso')  { 
              &quot;$exe - $line&quot;
          }
       }
  </code></pre>
  <p>But the answer was:</p>
  <pre><code>System pid: 4 \&lt;unable to open process&gt; -  7540: File  (R--)   C:\Users\franc\OneDrive\Desktop\en_visual_studio_2015_shell_isolated_x86_dvd_9fda4a05.iso
  System pid: 4 \&lt;unable to open process&gt; -  7B18: File  (RW-)   C:\Users\franc\OneDrive\Desktop\en_visual_studio_2015_shell_isolated_x86_dvd_9fda4a05.iso
  </code></pre>
  <p>I ultimately used <a href="https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer" rel="nofollow noreferrer">Process Explorer</a> and I found out that what is handling the file is OneDrive.</p>
  <p>I stopped OneDrive but the problem persists.</p>
  <p>Any suggestion?</p>