With the Windows 10 Creators Update and above, the context menu option ‘Open command window here’ is replaced by ‘Open PowerShell window here’ entry. PowerShell replaces Command Prompt in the Win+X or Power User menu as well.
PowerShell is an advanced form of command prompt. It is extended with a huge set of ready-to-use cmdlets and comes with the ability to use .NET framework/C# in various scenarios.
While you can run all the classic commands using PowerShell, a lot of users still prefer Command Prompt. It is faster and opens instantly. The context menu option gives them the ability to quickly open the cmd.exe in the current folder without having to type a long command to change the working directory.
Recently, we saw how to restore “Open command window here” menu item for the right-click menu and Win +X menu.
If you don’t plan to use the new ‘Open PowerShell window here’ entry, let’s see how to remove it.
Remove PowerShell From Context Menu in Windows 10
- Press the Win + R keys and type
regedit
in the Run box. - Browse for the following branch:
HKEY_CLASSES_ROOT\Directory\shell\Powershell
-
Take ownership of the Powershell key.
- Now, create a new REG_SZ (string) value named
ProgrammaticAccessOnly
. - The ‘Open PowerShell window here’ entry is now hidden from the right-click context menu.
Now, repeat the steps above under the following Registry keys:HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell HKEY_CLASSES_ROOT\Drive\Background\shell\Powershell
After completing these steps, using Shift + Right-click will only show the ‘Open command window here’ option. Press and hold the Shift key and right-click any folder or drive to check out the context menu items.
How to Restore PowerShell Context Menu
To make the command visible again,
- Open the registry editor (regedit.exe).
- Go to the branch
HKEY_CLASSES_ROOT\Directory\shell\Powershell
. - Delete the value
ProgrammaticAccessOnly
. - Now, open the branch
HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell
. - Delete the value
ProgrammaticAccessOnly
. - Finally, go to
HKEY_CLASSES_ROOT\Drive\Background\shell\Powershell
. - Delete the value
ProgrammaticAccessOnly
.
Once all three values deleted, the ‘Open PowerShell window here’ will appear in the right-click menu of a folder, drive, and directory’s background.