Skip to content

Instantly share code, notes, and snippets.

View jonkeren's full-sized avatar

Jos Jonkeren jonkeren

View GitHub Profile
@jonkeren
jonkeren / Fix-OneDrive-Speed-Using-Registry.ps1
Created August 30, 2026 19:44
Windows 11 improve speed of navigationg Onedrive folders in Explorer
# Inspired by question of Stefan Boutsen https://superuser.com/users/2759400/stefan-boutsen
# File Explorer is slow when traversing files synced with OneDrive on Windows 11
# https://superuser.com/questions/1891413/file-explorer-is-slow-when-traversing-files-synced-with-onedrive-on-windows-11/1940024
# On Windows 11 Onedrive is very slow accessing through the main window Onedrive or SharePointsync'd folders.
# Using procmon, Explorer.exe is losing 5-6 seconds doing a lot of ReqQueryKey on the HKCU\Software\Classes\ tree.
# It boils down on changing permission to full control for the ondrivesync entries here: Computer\HKEY_CLASSES_ROOT\PackagedCom\Package\Microsoft.OneDriveSync_xxxxxxxx to the "Everyone" account.
# No more entries logged on HKCU\Software\Classes tree. This speeds up Navigating Onedrive folders in Explorer by at least 10x.
@jonkeren
jonkeren / Windows-Explorer-Speedup.ps1
Created June 25, 2024 15:50
Make Windows Explorer much faster. Disable FolderType enumeration.
# Windows Explorer can be really slow if the folder has a lot of files.
# Can be solved with:
reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell" /v "FolderType" /t REG_SZ /d "NotSpecified" /f
@jonkeren
jonkeren / adobe-block-and-kill.ps1
Last active June 25, 2024 15:46
Adobe software block all .exe's in Windows Firewall and kill 5 unnecessary Adobe Background processes. Photoshop, Illustrator, Premiere Pro
### Powershell command to create Firewall block rules for all .exe files in a directory
# This will recurse the directory, and automatically add an incoming and outgoing block rule in the Windows Firewall to block all program's access to internet.
Get-ChildItem -Recurse -Path "DIRECTORY" *.exe |
Select-Object Name,FullName |
ForEach-Object `
{New-NetFirewallRule -DisplayName "Block $($_.Name) Inbound" -Direction Inbound -Program "$($_.FullName)" -Action Block;
New-NetFirewallRule -DisplayName "Block $($_.Name) Outbound" -Direction Outbound -Program "$($_.FullName)" -Action Block}
# Directories to block for Adobe software: `C:\Program Files\Adobe`, `C:\Program Files (x86)\Adobe`, `C:\Program Files\Common #Files\Adobe`, `C:\Program Files (x86)\Common Files\Adobe`.
@jonkeren
jonkeren / Windows-10-11-quick-fix-settings.ps1
Last active July 18, 2026 21:21
Windows 10/11 misc. tweaks, settings, debloat. This is a fairly long list. I run these normally after a fresh Windows install. You can copy / paste this into an admin-Powershell window. All at once, or individually of course. Or, save as a .ps1 file and execute.
# Disable Xbox features
Get-AppxPackage "Microsoft.XboxApp" | Remove-AppxPackage
Get-AppxPackage "Microsoft.XboxIdentityProvider" | Remove-AppxPackage -ErrorAction SilentlyContinue
Get-AppxPackage "Microsoft.XboxSpeechToTextOverlay" | Remove-AppxPackage
Get-AppxPackage "Microsoft.XboxGameOverlay" | Remove-AppxPackage
Get-AppxPackage "Microsoft.Xbox.TCUI" | Remove-AppxPackage
# Disable Xbox GameDVR
reg.exe add "HKCU\Software\Microsoft\GameBar" /v "AllowAutoGameMode" /t REG_DWORD /d "0" /f
reg.exe add "HKCU\Software\Microsoft\GameBar" /v "ShowStartupPanel" /t REG_DWORD /d "0" /f