mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-06-28 17:14:45 -05:00
one drive cleanup fixes
This commit is contained in:
@ -2170,17 +2170,9 @@
|
||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:userprofile\\OneDrive\"
|
||||
}
|
||||
|
||||
Write-Host \"Disable OneDrive via Group Policies\"
|
||||
New-Item -Path \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\OneDrive\" -Force
|
||||
Set-ItemProperty -Path \"HKLM:\\SOFTWARE\\Wow6432Node\\Policies\\Microsoft\\Windows\\OneDrive\" \"DisableFileSyncNGSC\" 1
|
||||
|
||||
Write-Host \"Remove Onedrive from explorer sidebar\"
|
||||
New-PSDrive -PSProvider \"Registry\" -Root \"HKEY_CLASSES_ROOT\" -Name \"HKCR\"
|
||||
mkdir -Force \"HKCR:\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\"
|
||||
Set-ItemProperty -Path \"HKCR:\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" \"System.IsPinnedToNameSpaceTree\" 0
|
||||
mkdir -Force \"HKCR:\\Wow6432Node\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\"
|
||||
Set-ItemProperty -Path \"HKCR:\\Wow6432Node\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" \"System.IsPinnedToNameSpaceTree\" 0
|
||||
Remove-PSDrive \"HKCR\"
|
||||
Set-ItemProperty -Path \"HKCR:\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" -Name \"System.IsPinnedToNameSpaceTree\" -Value 0
|
||||
Set-ItemProperty -Path \"HKCR:\\Wow6432Node\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" -Name \"System.IsPinnedToNameSpaceTree\" -Value 0
|
||||
|
||||
Write-Host \"Removing run hook for new users\"
|
||||
reg load \"hku\\Default\" \"C:\\Users\\Default\\NTUSER.DAT\"
|
||||
@ -2221,6 +2213,7 @@
|
||||
Start-Process \"explorer.exe\"
|
||||
|
||||
Write-Host \"Waiting for explorer to complete loading\"
|
||||
Write-Host \"Please Note - OneDrive folder may still have items in it. You must manually delete it, but all the files should already be copied to the base user folder.\"
|
||||
Start-Sleep 5
|
||||
"
|
||||
],
|
||||
|
Reference in New Issue
Block a user