Skip to content

Commit

Permalink
Disable removal of onedrive stuff in WinSxS
Browse files Browse the repository at this point in the history
close #297
  • Loading branch information
W4RH4WK committed Nov 26, 2021
1 parent 80da8e5 commit 83c8252
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scripts/remove-onedrive.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ Start-Process "explorer.exe"
Write-Output "Waiting for explorer to complete loading"
Start-Sleep 10

Write-Output "Removing additional OneDrive leftovers"
foreach ($item in (Get-ChildItem "$env:WinDir\WinSxS\*onedrive*")) {
Takeown-Folder $item.FullName
Remove-Item -Recurse -Force $item.FullName
}
# This can break Windows Update and some system utilities, see #297.
#Write-Output "Removing additional OneDrive leftovers"
#foreach ($item in (Get-ChildItem "$env:WinDir\WinSxS\*onedrive*")) {
# Takeown-Folder $item.FullName
# Remove-Item -Recurse -Force $item.FullName
#}

0 comments on commit 83c8252

Please sign in to comment.