From 83c825267c66dcdec0a2b59f6e3d815004d89372 Mon Sep 17 00:00:00 2001 From: Alex Hirsch Date: Sat, 27 Nov 2021 00:55:56 +0100 Subject: [PATCH] Disable removal of onedrive stuff in WinSxS close #297 --- scripts/remove-onedrive.ps1 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/remove-onedrive.ps1 b/scripts/remove-onedrive.ps1 index 7bb9032..2988a20 100644 --- a/scripts/remove-onedrive.ps1 +++ b/scripts/remove-onedrive.ps1 @@ -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 +#}