Turn off Windows 10 OneDrive link in Explorer Sidebar
Quick couple of lines of PowerShell to turn off the OneDrive integration in Windows Explorer for those of us that use other providers and would like to recover the space taken by the OneDrive link.
1 2 |
New-PSDrive -PSProvider registry -Root HKEY_CLASSES_ROOT -Name HKCR Set-ItemProperty -Path 'HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}' -Name 'System.IsPinnedToNameSpaceTree' -Value 0 |
Before: | After: |
As a full blown script with a little error checking.
1 2 3 4 5 6 7 8 9 10 11 |
If (!(Test-Path HKCR:\)) { New-PSDrive -PSProvider registry -Root HKEY_CLASSES_ROOT -Name HKCR } If ((Get-ItemProperty -Path 'HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}').'System.IsPinnedToNameSpaceTree' -eq 0) { Write-Host "Already turned off." } Else { Set-ItemProperty -Path 'HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}' -Name 'System.IsPinnedToNameSpaceTree' -Value 0 Write-Host "Should now be turned off." } |
Cheers
Lewis
-Oh, news from this week, I asked my (very dedicated) girlfriend of 7 years to marry me. She said yes. 🙂
I had uninstalled onedrive a while back so needed to find out how to remove it. I tried the registry edit manually (setting it to ‘0’) via another site’s guide, but onedrive still wouldn’t go away, even after a restart. This was the one that worked. I think the issue was not running the registry as root / admin, which seems to be suggested in the first powershell command above. Thanks
Latest sinner is “Creative Cloud Files” that appeared after I installed a copy of Adobe Premiere Elements 2018. The CLSID location for that is:
HKCR:\CLSID\{0E270DAA-1BE6-48F2-AC49-5DB106A576CE}