title: How to remove user profile completely from the Windows 10 computer?
body: <p>I want to remove local user in windows 10 computer through powershell. </p>
  
  <p>I have tried command</p>
  
  <pre><code>Get-WMIObject -class Win32_UserProfile | Where {((!$_.Special) -and ($_.LocalPath -eq "C:\\Users\\$user")  -and ($_.LocalPath -ne "C:\\Users\\UpdatusUser"))} | Remove-WmiObject
  </code></pre>
  
  <p>The Above command removes local user sucessfully. But it can't delete <code>C:\Users\$user\AppData</code></p>
  
  <p>Is there any workaround/hack to remove user/AppData folder.</p>
  
  <p>I have also tried removing folder after successful deletion of user, but I am getting an error.</p>
  
  <p>Error:<strong>There is a mismatch between the tag specified in the request and the tag present in the reparse point</strong></p>
  
  <p>For error reference I tried some workaround on that error message none worked. But if I do shift+delete (Manually) It will delete sucessfully. </p>
  
  <p>Command I am using to remove is below</p>
  
  <pre><code>Remove-Item C:\User\$user -Force -Recurse
  </code></pre>
  
  <p>I am running PowerShell as Administrator.</p>
  
  <p>Thanks in Advance.</p>