r/PowerShell • u/GCSS-MC • Dec 28 '25
Toggle Windows 11 Context menu
This script will toggle your default context menu in Windows 11 (Switch between the Win 11 and the "show more options" as default when you right click in Windows Explorer)
https://github.com/volshebork/PowerShell/blob/main/Context%20Menu/Toggle-ContextMenu.ps1
I am much more of a bash guy and I think too many comments is better than two few. I come from Linux, so I am not sure if there are any ps best practices I am missing. Hope this helps someone, because I know it is a game changer for me.
14
Upvotes
16
u/xCharg Dec 28 '25
Why would you want to toggle it back and forth?
Also why would you prompt for UAC, in which case a) script toggles the setting for administrator account not user's (which covers pretty much everyone except home users) and b) modifying HKCU:\ does not need admin access at all.
7
u/OlivTheFrog Dec 28 '25
Why a nice PowerShell script with a Reg.exe in the middle instead of the corresponding PowerShell cmdlet ?
regards
8
u/CoNsPirAcY_BE Dec 28 '25
Improved version. Especially to use the proper commands for the register.
3
u/pigers1986 Dec 28 '25
where are powershell commands inside PS1 file ?
too lazy to code it properly till end
2
u/dbsmith Dec 29 '25
Oh cool! I have been maintaining mine since 2023. It uses native PowerShell for more of the actions and defaults to disabling the new context menu.
2
u/andyr354 Dec 29 '25
Shift + Right Click opens that menu by default.