The default "Open Windows PowerShell" entry in the Windows Explorer right-click context menu can be removed by editing the Windows Registry. This change targets specific registry keys associated with folder and directory contexts, effectively hiding the option from standard users while keeping the shell accessible via other means.
Understanding the Context Menu Entry
Starting with Windows 10 version 1809, Microsoft introduced a convenient feature that adds an "Open Windows PowerShell" option to the right-click menu when you select a folder or an empty space within a directory. For many power users, this is a helpful shortcut. However, for those who prefer a cleaner interface or use alternative terminal emulators, this entry can become clutter. Removing it does not disable PowerShell itself; it only removes the specific integration point within the File Explorer shell extension.
This modification requires direct interaction with the Windows Registry Editor. Because the registry controls core system behaviors, caution is advised. It is recommended to create a backup of your registry before proceeding. You can do this by opening regedit, selecting File > Export, and saving a .reg file. If something goes wrong, you can simply double-click that file to restore your previous settings. Note that if you wish to remove the similar "Open PowerShell here" entry that appears when you hold Shift while right-clicking, the process is slightly different, as covered in our guide on How to Disable Default Open with PowerShell Right-Click Menu Without Disabling PowerShell Entry in File Menu.
Method 1: Editing the Registry Manually
The most reliable way to remove this option is to delete the specific registry subkeys responsible for registering the shell extension. There are two primary locations where these entries are stored: one for folders and one for directories (empty spaces).
- Press
Win + Rto open the Run dialog. - Type
regeditand press Enter. If prompted by User Account Control, click Yes. - Navigate to the following path for folder contexts:
HKEY_CLASSES_ROOT\Directory\Background\shell\Windows.PowerShell - Navigate to the following path for directory/folder item contexts:
HKEY_CLASSES_ROOT\Directory\shell\Windows.PowerShell - You may also need to check the
Drivekey if you want to remove it from drive roots:HKEY_CLASSES_ROOT\Drive\shell\Windows.PowerShell - Select each of these keys and press
Delete. Confirm the deletion when prompted. - Close the Registry Editor.
After deleting these keys, the changes take effect immediately. You may need to close any open Explorer windows and reopen them to see the removal reflected in the right-click menu. This method is permanent until you manually recreate the keys or run a restoration script.
Method 2: Using a .REG File for Automation
If you prefer a non-interactive approach or need to apply this setting across multiple machines, you can use a registry import file. Create a new text file and name it RemovePowerShellContextMenu.reg. Paste the following content into the file:
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Windows.PowerShell]
[-HKEY_CLASSES_ROOT\Directory\shell\Windows.PowerShell]
[-HKEY_CLASSES_ROOT\Drive\shell\Windows.PowerShell]
Save the file, then double-click it to merge it into your registry. Click Yes to approve the changes. This achieves the same result as the manual method but ensures consistency and speed. Be aware that this approach assumes the default installation paths of the PowerShell shell extensions. In rare cases involving custom installations or third-party integrations, additional keys might exist.
Restoring the Option
If you decide that you miss the convenience of the PowerShell shortcut, you can easily restore it. Instead of deleting the keys, you would typically re-import a .reg file that creates these keys again. Alternatively, you can reverse the process by creating the keys manually, though Microsoft does not provide a simple toggle in Settings for this. Some users opt to keep the entry but rename it or change its icon using the same registry paths. For those interested in broader system customizations, such as altering visual themes, you might also look into How to Programmatically Change the Windows 11 Color Scheme to further tailor your desktop experience.
Risks and Considerations
Modifying the registry carries inherent risks. While removing these specific keys is generally safe and reversible, incorrect edits to other parts of the registry can cause system instability. Always ensure you are targeting the exact paths listed above. Do not delete parent keys like Directory\Background or Directory themselves, as this could break other functionality in File Explorer. Furthermore, note that this action does not affect the ability to launch PowerShell from the Start Menu or via the command line. It strictly affects the context menu integration. If you encounter issues with other context menu items, such as GPU software integrations, you might find relevant troubleshooting steps in articles about How to Remove AMD Software: Adrenalin Edition from Windows Explorer Context Menu.
Frequently Asked Questions
Does removing this entry uninstall PowerShell?
No, removing the context menu entry does not uninstall or disable PowerShell. The application remains fully functional and can still be launched from the Start Menu, Taskbar, or by typing powershell in the Run dialog. This change only hides the shortcut from the right-click menu in File Explorer.
Will Windows Updates revert this change?
In most cases, Windows updates will not automatically restore this registry key. However, major feature updates occasionally reset certain shell extensions. If the entry reappears after a significant update, you may need to reapply the registry fix or check if a newer version of Windows has moved the key location.
Can I remove the entry only for my user account?
The keys mentioned in this article are located under HKEY_CLASSES_ROOT, which is a merged view of HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE. To restrict the change to a single user, you should target the HKEY_CURRENT_USER\Software\Classes equivalent paths. However, for most home users, modifying the global keys is sufficient and simpler.
What if the right-click menu is still slow after removal?
If your context menu feels sluggish even after removing the PowerShell entry, the delay might be caused by other third-party shell extensions. Tools like ShellExView can help identify and disable problematic extensions. Removing unnecessary context menu items is a common first step in troubleshooting Explorer performance issues.
Is there a GUI tool to manage this?
There are no built-in graphical settings in Windows to toggle this specific option. Third-party tools like "Context Menu Manager" or "Winaero Tweaker" may offer a graphical interface to hide or show this entry without directly editing the registry, providing a safer alternative for less technical users.