How To Remove PowerShell From Context Menu in Windows 10

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

  1. Press the Win + R keys and type regedit in the Run box.
  2. Browse for the following branch:
    HKEY_CLASSES_ROOT\Directory\shell\Powershell
  3. Take ownership of the Powershell key.Take Ownership Of A Registry Key 1
  4. Now, create a new REG_SZ (string) value named ProgrammaticAccessOnly.Remove Powershell Programmaticaccessonly
  5. The ‘Open PowerShell window here’ entry is now hidden from the right-click context menu.PowerShell Is RemovedNow, 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,

  1. Open the registry editor (regedit.exe).
  2. Go to the branch HKEY_CLASSES_ROOT\Directory\shell\Powershell.
  3. Delete the value ProgrammaticAccessOnly.
  4. Now, open the branch HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell.
  5. Delete the value ProgrammaticAccessOnly.
  6. Finally, go to HKEY_CLASSES_ROOT\Drive\Background\shell\Powershell.
  7. 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.

Looks like you've read the post to the end. If you enjoyed it, please share it. You would greatly help our blog to grow!

Author: The MFTNEXT Team

The MSFTNEXT project is a small team of authors who love to engage with the latest technology and gadgets. Being passionate Windows bloggers, we are happy to help others fix their system issues.

One thought on “How To Remove PowerShell From Context Menu in Windows 10”

  1. I’ve been reading tutorials all over the net, about this subject and it is really pointless. Why go through the trouble of registry editing, when all you have to do is issue “cmd.exe” from the powershell prompt and powershell starts behaving like command prompt.

Leave a Reply

Your email address will not be published.

css.php