This tutorial will show you how to add or remove the "Open PowerShell window here" context menu for all users in Windows 11.
Windows PowerShell is a task-based command-line shell and scripting language designed especially for system administration. Built on the .NET Framework, Windows PowerShell helps IT professionals and power users control and automate the administration of the Windows operating system and applications that run on Windows.
You can press Shift while right clicking on the desktop, a folder, a drive, or the background of a open folder or drive window to see the Open PowerShell window here context menu.
Since Windows 11 already has a Open in Terminal context menu to use, you may want to remove the Open PowerShell window here context menu to clean it up unwanted items.
You must be signed in as an administrator to add or remove the Open PowerShell window here desktop context menu.
Contents
- Option One: Add "Open PowerShell window here" to context menu
- Option Two: Remove "Open PowerShell window here" from context menu
EXAMPLE: "Open PowerShell window here" context menu
This is the default setting.
1 Click/tap on the Download button below to download the file below.
Add_Open_PowerShell_window_here_context_menu.reg
Download
(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell]
@="@shell32.dll,-8508"
"Extended"=""
"NoWorkingDirectory"=""
"ShowBasedOnVelocityId"=dword:00639bc8
[HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell\command]
@="powershell.exe -noexit -command Set-Location -literalPath \"%V\""
[HKEY_CLASSES_ROOT\Directory\shell\Powershell]
@="@shell32.dll,-8508"
"Extended"=""
"NoWorkingDirectory"=""
"ShowBasedOnVelocityId"=dword:00639bc8
[HKEY_CLASSES_ROOT\Directory\shell\Powershell\command]
@="powershell.exe -noexit -command Set-Location -literalPath '%V'"
[HKEY_CLASSES_ROOT\Drive\shell\Powershell]
@="@shell32.dll,-8508"
"Extended"=""
"NoWorkingDirectory"=""
"ShowBasedOnVelocityId"=dword:00639bc8
[HKEY_CLASSES_ROOT\Drive\shell\Powershell\command]
@="powershell.exe -noexit -command Set-Location -literalPath '%V'"
2 Save the .reg file to your desktop.
3 Double click/tap on the downloaded .reg file to merge it.
4 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.
5 You can now delete the downloaded .reg file if you like.
1 Open Registry Editor (regedit.exe).
2 Navigate to the registry key below in the left pane of Registry Editor. (see screenshot below)
HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell
3 Perform the steps below to change the owner and enable inheritance of the "Personalize" key and its "command" subkey: (see screenshots below)
- Change the owner of the Powershell key to be Administrators.
- While changing the owner, check Replace owner on subcontainers and objects.
- While changing the owner, check Replace all child object permission entries with inheritable permission entries from this object.
- Click/tap on OK and Yes.
4 Change the permissions of the Powershell key to "Allow" Administrators "Full Control". (see screenshot below)
5 Navigate to the registry key below in the left pane of Registry Editor. (see screenshot below)
HKEY_CLASSES_ROOT\Directory\shell\Powershell
6 Perform the steps below to change the owner and enable inheritance of the "Personalize" key and its "command" subkey: (see screenshots below)
- Change the owner of the Powershell key to be Administrators.
- While changing the owner, check Replace owner on subcontainers and objects.
- While changing the owner, check Replace all child object permission entries with inheritable permission entries from this object.
- Click/tap on OK and Yes.
7 Change the permissions of the Powershell key to "Allow" Administrators "Full Control". (see screenshot below)
8 Navigate to the registry key below in the left pane of Registry Editor. (see screenshot below)
HKEY_CLASSES_ROOT\Drive\shell\Powershell
9 Perform the steps below to change the owner and enable inheritance of the "Personalize" key and its "command" subkey: (see screenshots below)
- Change the owner of the Powershell key to be Administrators.
- While changing the owner, check Replace owner on subcontainers and objects.
- While changing the owner, check Replace all child object permission entries with inheritable permission entries from this object.
- Click/tap on OK and Yes.
10 Change the permissions of the Powershell key to "Allow" Administrators "Full Control". (see screenshot below)
11 You can now close Registry Editor if you like.
12 Click/tap on the Download button below to download the file below.
Remove_Open_PowerShell_window_here_context_menu.reg
Download
(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell]
[-HKEY_CLASSES_ROOT\Directory\shell\Powershell]
[-HKEY_CLASSES_ROOT\Drive\shell\Powershell]
13 Save the .reg file to your desktop.
14 Double click/tap on the downloaded .reg file to merge it.
15 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.
This REG file will not be allowed to merge unless you did all of steps 2 to 10 first.
16 You can now delete the downloaded .reg file if you like.
That's it,
Shawn Brink
Attachments
Last edited: