W4RH4WK/Debloat-Windows-10

cannot run remove onedrive "cannot remove item" "access to path denied"

Open

#222 创建于 2019年12月19日

在 GitHub 查看
 (7 评论) (0 反应) (0 负责人)PowerShell (6,158 star) (804 fork)batch import
help wanted

描述

I followed all of the steps correctly and am using admin powershell, yet i get this set of errors everytime.

Remove-Item : Cannot remove item C:\WINDOWS\WinSxS\wow64_microsoft-windows-onedrive-setup_31bf3856ad364e35_10.0.18362.1
_none_01f25b79d7a97c4b\OneDriveSetup.exe: Access to the path 'OneDriveSetup.exe' is denied.
At C:\Users\SU\Downloads\Debloat-Windows-10-master\Debloat-Windows-10-master\scripts\remove-onedrive.ps1:61 char:5
+     Remove-Item -Recurse -Force $item.FullName
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (OneDriveSetup.exe:FileInfo) [Remove-Item], UnauthorizedAccessExceptio
   n
    + FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
Remove-Item : Cannot remove item
C:\WINDOWS\WinSxS\wow64_microsoft-windows-onedrive-setup_31bf3856ad364e35_10.0.18362.1_none_01f25b79d7a97c4b: The
directory is not empty.
At C:\Users\SU\Downloads\Debloat-Windows-10-master\Debloat-Windows-10-master\scripts\remove-onedrive.ps1:61 char:5
+     Remove-Item -Recurse -Force $item.FullName
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (C:\WINDOWS\WinS...1f25b79d7a97c4b:DirectoryInfo) [Remove-Item], IOException
    + FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell.Commands.RemoveItemCommand

贡献者指南